Initial creation of new Repository

This commit is contained in:
Brian Mc Cullough 2024-09-06 22:00:02 +02:00
commit 3c0fa1d98a
16 changed files with 1176 additions and 0 deletions

106
about.php Normal file
View file

@ -0,0 +1,106 @@
<?php
/*
* Talk about CAcert and OpenID Connect
*/
echo file_get_contents("html/header.html");
?>
<div class="aboutDiv scrollDiv">
<h2>This Site and Service</h2>
This site has been developed by CAcert to give CAcert certificate users the ability to
allow users of their web sites to connect using OpenID supported by the CAcert Web-Of-Trust.
<br>
<br>
We hope that this will help you creating a bridge between your website,
whether powered by Drupal,
Wordpress, or other technology, and your users, who are holders of CAcert Client SSL
Certificates and can be identified to your site that way.
<br>
<br>
<br>
<h2>CAcert</h2>
CAcert.org is a community-driven Certificate Authority that issues certificates to the public at large for free.
<br>
<br>
CAcert's goal is to promote awareness and education on computer security through the use of encryption,
specifically by providing cryptographic certificates. These certificates can be used to digitally sign and
encrypt email, authenticate and authorize users connecting to websites and secure data transmission over the
internet. Any application that supports the Secure Socket Layer Protocol (SSL or TLS) can make use of
certificates signed by CAcert, as can any application that uses X.509 certificates, e.g. for encryption or code
signing and document signatures.
<br>
<br>
If you want to have free certificates issued to you, join the CAcert Community .
<br>
<br>
If you want to use certificates issued by CAcert, read the CAcert Root Distribution License .This license
applies to using the CAcert root keys .
<br>
<br>
<br>
<h2>OpenID Connect</h2>
<h4>What is OpenID Connect</h4>
OpenID Connect is an interoperable authentication protocol based on the OAuth 2.0
framework of specifications (IETF RFC 6749 and 6750). It simplifies the way to verify
the identity of users based on the authentication performed by an Authorization Server
and to obtain user profile information in an interoperable and REST-like manner.
<br>
<br>
OpenID Connect enables application and website developers to launch sign-in
flows and receive verifiable assertions about users across Web-based, mobile,
and JavaScript clients. And the specification suite is extensible to support a
range of optional features such as encryption of identity data, discovery of
OpenID Providers, and session logout. ( from OpenID Foundation )
<br>
<br>
OpenID Connect is an advancement from the older Oauth 2.0 technique, providing
a simpler method for servers and their users to connect and authenticate each other.
<br>
<br>
OpenID Connect (OIDC) is an identity authentication protocol that is an extension of
open authorization (OAuth) 2.0 to standardize the process for authenticating and
authorizing users when they sign in to access digital services. OIDC provides
authentication, which means verifying that users are who they say they are.
OAuth 2.0 authorizes which systems those users are allowed to access.
OAuth 2.0 is typically used to enable two unrelated applications to share information
without compromising user data. For example, many people use their email or social
media accounts to sign in to a third-party site rather than creating a new username
and password. OIDC is also used to provide single sign-on. Organizations can use a
secure identity and access management (IAM) system like Microsoft Entra ID (formerly
Azure Active Directory) as the primary authenticator of identities and then use
OIDC to pass that authentication to other apps.
<br>
<br>
This way users only need to sign in once with one username and password to
access multiple apps. ( from Microsoft )
<br>
<br>
<br>
</div>
<div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
<div>
<?php
// echo '<div style=" width:auto; color: black; background: lightgrey ; padding: 1em; vertical-align: bottom" >';
echo "<div class='pageFooter' >";
echo file_get_contents("html/footer.html");
echo "<p>Copyright © CAcert, Inc ";
echo date("Y");
echo "</div>";
?>
</div>

68
admin_delete.php Normal file
View file

@ -0,0 +1,68 @@
<?php
/*
* This is an adminstrative function, not exposed on the
* Menu, for debugging. It will remove all Client Registrations
* for a particular "Site Owner".
*
*/
error_reporting(E_ALL);
ini_set('display_errors', '1');
echo file_get_contents("html/header.html");
$ini_arr = parse_ini_file( "cacert.ini", true );
$dbUser = $ini_arr[ 'DB' ][ 'User' ];
$dbPass = $ini_arr[ 'DB' ][ 'Password' ];
$internalHydraEndpointURL = $ini_arr[ 'URLs' ][ 'InternalHydraEndpointURL' ];
$db = new PDO("pgsql:host=localhost;port=5432;dbname=oidc_db;user=$dbUser;password=$dbPass");
$sql = "select client_id from clients where site_owner like 'Brian %'";
foreach ( $db->query($sql) as $row) {
$clientID = $row['client_id'];
$retcode = exec("/srv/hydra/bin/hydra delete oauth2-client $clientID --endpoint $internalHydraEndpointURL ", $hydraArray);
$outArray = [];
foreach ($hydraArray as $hydra) {
$keyIDX = strpos($hydra,"\t");
if ( $keyIDX === false ) {
$outArray[ $hydra ] = "";
} else {
$valIDX = strrpos($hydra,"\t", -1);
$key = substr( $hydra, 0, $keyIDX );
$val = substr( $hydra, $valIDX + 1 );
$outArray[ $key ] = $val;
}
}
echo "Input: " . var_export($clientID,true) . "<br>";
echo "Hydra: " . var_export($outArray,true) . "<br>";
$stmt = $db->prepare("update clients set deleted_at = now() where client_id = :client_id");
$retcode = $stmt->execute( [ $clientID ]);
echo "<br><br>";
echo "DB Retcode: " . var_export($retcode,true). "<br>";
}
echo file_get_contents("html/footer.html");
echo "<br>";
echo '<p>Copyright © CAcert, Inc ';
echo date("Y");
echo "</p>";

10
cacert.ini.sample Normal file
View file

@ -0,0 +1,10 @@
[DB]
User="User ID for DB"
Password="Password for DB"
[URLs]
InternalHydraEndpointURL="https://auth.cacert.localhost:4445"
WellKnownURL="https://registration.<Your URL>:4444/.well-known/openid-configuration"
AuthURL="https://authserver.<Your URL>:4444/oauth2/auth"
TokenURL="https://authserver.<Your URL>:4444/oauth2/token"
UserInfoURL="https://authserver.<Your URL>:4444/userinfo"

113
delete.php Normal file
View file

@ -0,0 +1,113 @@
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
echo file_get_contents("html/header.html");
$ini_arr = parse_ini_file( "cacert.ini", true );
$dbUser = $ini_arr[ 'DB' ][ 'User' ];
$dbPass = $ini_arr[ 'DB' ][ 'Password' ];
$clientDN = $_SERVER['SSL_CLIENT_S_DN'];
$radioArray = [];
$db = new PDO("pgsql:host=localhost;port=5432;dbname=oidc_db;user=$dbUser;password=$dbPass");
$sql = "select id, site_name, site_owner, client_id, owner_id, created_at from clients where owner_id = '$clientDN' and deleted_at is null";
foreach ($db->query($sql) as $row) {
$data['id'] = $row['id'];
$data['site_name'] = $row['site_name'];
$data['site_owner'] = $row['site_owner'];
$data['client_id'] = $row['client_id'];
$data['owner_id'] = $row['owner_id'];
$data['created_at'] = $row['created_at'];
$radioArray[] = $data;
}
$itemCount = count($radioArray);
?>
<div class="scrollDiv" style=" border: 5px outset blue; padding: 1em; ">
<p>
This page allows you to remove a site registration that
you have created with this tool.
</p>
<h3>Choose a Site Registration to Delete</h3>
<form id="delete_form" action="delete1.php" method="post" enctype="application/x-www-form-urlencoded">
<div>
<table style="border: solid 1px black ; border-collapse: collapse">
<tr>
<th>
&nbsp;
</th>
<th>
Site Name
</th>
<th>
Site Owner
</th>
<th>
Owner ID
</th>
<th>
Date Created
</th>
</tr>
<?php
for ($i = 0; $i < $itemCount; $i++) {
echo "<tr>";
echo "<td>";
echo "<input type='radio' id='radiobtn' name='radiobtn' value='$i' />";
echo "</td>";
echo "<td>";
$site_name = $radioArray[$i]["site_name"];
echo "$site_name";
echo "</td>";
echo "<td>";
$site_owner = $radioArray[$i]["site_owner"];
echo "$site_owner";
echo "</td>";
echo "<td>";
$owner_id = $radioArray[$i]["owner_id"];
echo "$owner_id";
$client_id = $radioArray[$i]["client_id"];
echo "<input type='hidden' id='client_id[$i]' name='client_id[$i]' value='$client_id' />";
echo "</td>";
echo "<td>";
$createdAt = new DateTime($radioArray[$i]["created_at"]);
$createdAtStr = date_format($createdAt, 'Y-m-d H:i:s');
echo "$createdAtStr";
echo "</td>";
echo "</tr>";
}
?>
</table>
</div>
<br>
<input type="submit" name="deleteit" value="Remove Site Registration"/>
</form>
<br>
<br>
<?php
echo "<div class='pageFooter'>";
echo file_get_contents("html/footer.html");
echo "<br>";
echo '<p>Copyright © CAcert, Inc ';
echo date("Y");
echo "</p>";
echo "</div>";
echo "</div>";

95
delete1.php Normal file
View file

@ -0,0 +1,95 @@
<?php
/*
* Collect Site Name, DN, list of E-Mail addresses, Serial Number
*
* Call Hydra to create new record, collect Client ID and Secret
*
* Send Client ID and Secret back to caller and display
*
*/
error_reporting(E_ALL);
ini_set('display_errors', '1');
echo file_get_contents("html/header.html");
$ini_arr = parse_ini_file( "cacert.ini", true );
$internalHydraEndpointURL = $ini_arr[ 'URLs' ][ 'InternalHydraEndpointURL' ];
$dbUser = $ini_arr[ 'DB' ][ 'User' ];
$dbPass = $ini_arr[ 'DB' ][ 'Password' ];
?>
<div class="scrollDiv" >
<?php
if (isset($_POST['radiobtn'])) {
$idx = $_POST['radiobtn'];
$clientID = $_POST['client_id'][$idx];
}
$hydraCommand = "/srv/hydra/bin/hydra delete oauth2-client $clientID --endpoint $internalHydraEndpointURL ";
$retcode = exec($hydraCommand, $hydraArray);
$outArray = [];
foreach ($hydraArray as $hydra) {
$keyIDX = strpos($hydra, "\t");
if ($keyIDX === false) {
$outArray[$hydra] = "";
} else {
$valIDX = strrpos($hydra, "\t", -1);
$key = substr($hydra, 0, $keyIDX);
$val = substr($hydra, $valIDX + 1);
$outArray[$key] = $val;
}
}
if ($outArray['ID'] == $clientID) {
$db = new PDO("pgsql:host=localhost;port=5432;dbname=oidc_db;user=$dbUser;password=$dbPass");
$stmt = $db->prepare("update clients set deleted_at = now() where client_id = :client_id");
$retcode = $stmt->execute([$clientID]);
$stmt = $db->query("select site_name, created_at, client_id from clients where client_id = '$clientID' ");
$result = $stmt->fetchAll();
?>
<div style="background-color: lightblue; color: black; padding: 1em">
<p>
<?php
$siteInfo = $result['0'];
?>
Site <?php echo $siteInfo['site_name'] ?>
with Client ID <?php echo $siteInfo['client_id'] ?>
deleted successfully
</p>
</div>
<?php
}
echo "<div class='pageFooter' >";
echo file_get_contents("html/footer.html");
echo "<br>";
echo '<p>Copyright © CAcert, Inc ';
echo date("Y");
echo "</p>";
echo "</div>";
echo "</div>";

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

2
html/CAcert-logo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.4 KiB

2
html/body.html Normal file
View file

@ -0,0 +1,2 @@
<!-- <h1>CAcert OpenID Connect Registration</h1> -->

14
html/footer.html Normal file
View file

@ -0,0 +1,14 @@
<!-- <footer> -->
<!--
<p>
Contact us in various ways .... ( I don't know what to put here )
</p>
-->
<!-- </footer> -->
</body>
</html>

25
html/header.html Normal file
View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" contents="CAcert website to provide public OpenID Connect functionality.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<header>
<div class="headerDiv" style="vertical-align: top; height: fit-content; /* display: inline-block; */">
<div style="display: block; float: left; position: relative; margin-right: 5em;">
<img src="html/CAcert-logo.svg" width="510px" height="120px">
</div>
<div style="display: block; top: 0; float: right; padding: 5px; padding-top: 10px; background-color: deepskyblue; margin-left: 5em; ">
<a href="index.php"><h1 style="color:white; padding: 5px; ">Home</h1></a>
</div>
</div>
</header>

47
index.php Normal file
View file

@ -0,0 +1,47 @@
<?php
echo file_get_contents("html/header.html");
$ini_arr = parse_ini_file( "cacert.ini", true );
?>
<div class="navDiv" >
<ul>
<li>
<a href="info.php" title="Info">Info</a>
</li>
<li>
<a href="register.php" title="Register A New Site">Register a New Site</a>
</li>
<li>
<a href="list.php" title="List Registered Sites">List Registered Sites</a>
</li>
<li>
<a href="delete.php" title="Delete A Registration">Delete A Registration</a>
</li>
<li>
<a href="about.php" title="About">About This Site</a>
</li>
</ul>
</div>
<br>
<br>
<div >
<?php
echo '<div style="position: fixed; width:auto; color: black; vertical-align: bottom; background: lightgrey ; padding: 1em; vertical-align: bottom" >';
echo file_get_contents("html/footer.html");
echo "<p>Copyright © CAcert, Inc ";
echo date("Y");
echo "</div>";
?>
</div>
</body>
</html>

58
info.php Normal file
View file

@ -0,0 +1,58 @@
<?php
echo file_get_contents("html/header.html");
$ini_arr = parse_ini_file( "cacert.ini" );
?>
<div class="scrollDiv" style="position: absolute; top: 200px; left: 50px; width: 80%">
<div style='color: black; background: beige; padding: 1em; margin-right: 5px'>
<p>
This site provides several functions related to registering
your web site or application to use CAcert's OpenID Connect facility,
allowing people holding CAcert Client Certificates to use OpenID Connect
to log in to your site.
</p>
<p>
In order to use this site, you must have a valid
client certificate from CAcert installed in your browser.
</p>
<p>
Such a certificate may be obtained from
<a href="https://cacert.org" title-"CAcert Home" target="_blank" >CAcert</a>.
</p>
<p>
This tool provides three functions, found in the Home menu.
<br>
<b>Register a New Site</b>,
<b>List all Registered Sites</b>
and un-register or
<b>Delete a Site</b>.
</p>
<p>
You may download the various URLs provided by the OpenID component
<a href="<?php echo $ini_arr[ 'URLs' ][ 'WellKnownURL' ] ?>" title="OpenID Config" target="_blank" download="openid_configuration.json" >Here</a>
</p>
<p>
For more information, see our <b>About Page</b>
or <a href="https://cacert.org" title-"CAcert Home" target="_blank" >CAcert</a>.
</p>
</div>
<br>
<?php
echo "<div class='pageFooter'>";
echo file_get_contents("html/footer.html");
echo "<br>";
echo '<p>Copyright © CAcert, Inc ';
echo date("Y");
echo "</p>";
echo "</div>";
echo "</div>";

115
list.php Normal file
View file

@ -0,0 +1,115 @@
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
echo file_get_contents("html/header.html");
$ini_arr = parse_ini_file( "cacert.ini", true );
$dbUser = $ini_arr[ 'DB' ][ 'User' ];
$dbPass = $ini_arr[ 'DB' ][ 'Password' ];
$clientDN = $_SERVER['SSL_CLIENT_S_DN'];
$listArray = [];
$db = new PDO("pgsql:host=localhost;port=5432;dbname=oidc_db;user=$dbUser;password=$dbPass");
// $sql = "select id, site_name, site_owner, client_id, deleted_at, created_at from clients where owner_id = '$clientDN' and deleted_at is null";
$sql = "select id, site_name, site_owner, client_id, deleted_at, created_at from clients where owner_id = '$clientDN' ";
foreach ($db->query($sql) as $row) {
$data['id'] = $row['id'];
$data['site_name'] = $row['site_name'];
$data['site_owner'] = $row['site_owner'];
$data['client_id'] = $row['client_id'];
$data['created_at'] = $row['created_at'];
$data['deleted_at'] = $row['deleted_at'];
$listArray[] = $data;
}
$itemCount = count($listArray);
?>
<div class="scrollDiv" style=" line-height: normal; border: 5px outset blue; padding: 1em; background-color: lightblue" >
<p>
This page shows you all of the sites
that you have registered here, and their
current status.
</p>
<div style="/* position:fixed; top: 270px; left: 30px; padding: 15px; width: 80%; */ background-color: lightblue">
<h3>List of Site Registrations</h3>
<div>
<table style="border: solid 1px black ; border-collapse: collapse">
<tr>
<th>
Site Name
</th>
<th>
Site Owner
</th>
<th>
Client ID
</th>
<th>
Created
</th>
<th>
Status
</th>
</tr>
<?php
for ($i = 0; $i < $itemCount; $i++) {
echo "<tr>";
echo "<td>";
$site_name = $listArray[$i]["site_name"];
echo "$site_name";
echo "</td>";
echo "<td>";
$site_owner = $listArray[$i]["site_owner"];
echo "$site_owner";
echo "</td>";
echo "<td>";
$client_id = $listArray[$i]["client_id"];
echo "$client_id";
echo "</td>";
echo "<td>";
$createdAt = new DateTime($listArray[$i]["created_at"]);
$createdAtStr = date_format($createdAt, 'Y-m-d H:i:s');
echo "$createdAtStr";
echo "</td>";
echo "<td>";
if ( is_null($listArray[$i]["deleted_at"]) ) {
echo "Active";
} else {
echo "Deleted";
}
echo "</td>";
echo "</tr>";
}
?>
</table>
</div>
<br>
<br>
<br>
<br>
<?php
echo "<div class='pageFooter'>";
echo file_get_contents("html/footer.html");
echo "<br>";
echo '<p>Copyright © CAcert, Inc ';
echo date("Y");
echo "</p>";
echo "</div>";
echo "</div>";

317
register.php Normal file
View file

@ -0,0 +1,317 @@
<?php
echo file_get_contents("html/header.html");
$ini_arr = parse_ini_file( "cacert.ini", true );
$wellKnownURL = $ini_arr[ 'URLs' ][ 'WellKnownURL' ];
$dbUser = $ini_arr['DB']['User'];
$dbPass = $ini_arr['DB']['Password'];
if (count($_POST) > 0) {
$db = new PDO("pgsql:host=localhost;port=5432;dbname=oidc_db;user=$dbUser;password=$dbPass");
$siteName = $_POST['siteName'];
$redirectURL = $_POST['redirectURL'];
$authMethod = $_POST['endpointAuth'];
$notes = $_POST['notes'];
$clientDN = $_SERVER['SSL_CLIENT_S_DN'];
$cn_pos = strpos( $clientDN, ',CN=' );
$clientName = substr( $clientDN, $cn_pos + 4 );
$stmt = $db->query("select created_at from clients where site_name = '$siteName' and owner_id like '%$clientName%' and deleted_at is null");
$res = $stmt->fetch(PDO::FETCH_ASSOC);
echo "<div class='scrollDiv' style='padding: 1em;' >";
if ($res) {
echo "<div style='background-color: darkred; color: white; padding: 1em;' >";
echo "<br>";
echo "Error: Found an existing record for that site: '$siteName'";
echo "<br>";
echo "</div>";
} else {
for ($emailIndex = 0; $emailIndex < 20; $emailIndex++) {
$emailSAN = 'SSL_CLIENT_SAN_Email_' . $emailIndex;
if (array_key_exists($emailSAN, $_SERVER)) {
$clientEMail[] = $_SERVER[$emailSAN];
} else {
break;
}
}
switch( $authMethod ) {
case 'basic':
$endpointAuthMethod = 'client_secret_basic' ;
break;
case 'post':
$endpointAuthMethod = 'client_secret_post' ;
break;
}
$hydra_command = "/srv/hydra/bin/hydra create oauth2-client --endpoint " . $ini_arr[ 'URLs' ][ 'InternalHydraEndpointURL' ] . " --name '$siteName' --owner '$clientDN' --redirect-uri '$redirectURL' --token-endpoint-auth-method '$endpointAuthMethod' --scope openid,offline,offline_access,profile,email";
$retcode = exec($hydra_command, $hydraArray);
$outArray = [];
foreach ($hydraArray as $hydra) {
$keyIDX = strpos($hydra, "\t");
if ($keyIDX === false) {
$outArray[$hydra] = "";
} else {
$valIDX = strrpos($hydra, "\t", -1);
$key = substr($hydra, 0, $keyIDX);
$val = substr($hydra, $valIDX + 1);
$outArray[$key] = $val;
}
}
if (array_key_exists('CLIENT ID', $outArray)) {
echo "<h3>Here are your Client ID and Client Secret</h3>";
echo "<h5>";
echo "Make <b>sure</b> that you copy these two values somewhere safe, because the Client Secret can ";
echo "not be retrieved again.";
echo "</h5>";
echo "<br>";
echo "<br>";
echo "<table>";
echo "<tr>";
echo "<td>";
echo "Client ID";
echo "</td>";
echo "<td>&nbsp;";
echo "</td>";
echo "<td>";
echo $outArray['CLIENT ID'];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "Client Secret";
echo "</td>";
echo "<td>&nbsp;";
echo "</td>";
echo "<td>";
echo $outArray['CLIENT SECRET'];
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<br>";
echo "<br>";
echo "<p>";
echo "You will also need the following URLs for your site plugin.";
echo "</p>";
echo "<br>";
echo "<table>";
echo "<tr>";
echo "<td>";
echo "Authorize";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "<td>";
echo $ini_arr[ 'AuthURL' ];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "Token";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "<td>";
echo $ini_arr[ 'TokenURL' ];
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "User Info";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "<td>";
echo $ini_arr[ 'UserInfoURL' ];
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<br>";
?>
<p>
Download a list of relevant URLs
<a href="<?php echo $wellKnownURL ?>"
title="OpenID Config"
target="_blank" download="openid_configuration.json">here</a>
</p>
<?php
echo "<br>";
$stmt = $db->prepare("insert into clients
( site_name, site_owner, client_id, owner_id, redirect_url )
values ( ?, ?, ?, ?, ? ) ");
$clientID = $outArray['CLIENT ID'];
$retcode = $stmt->execute([$siteName, $clientName, $clientID, $clientDN, $redirectURL]);
$dbClientID = $db->lastInsertID();
$stmt = $db->prepare("insert into owner_email ( client_id, e_mail ) values ( ?, ? )");
foreach ($clientEMail as $mail) {
$retcode = $stmt->execute([$dbClientID, $mail]);
}
} else {
echo "<p style='padding: 1em' >";
echo "Unable to register new client.";
echo "</p>";
}
}
} else {
?>
<div class="scrollDiv" >
<div class="myDiv">
<table style="float: left; position: relative; padding-left: 1em; padding-right: 1em; border: none ;">
<tr style="border: none">
<td style="border: none">
<h2 style="display: table-row; color: black; ">
How to Register a New Site
</h2>
</td>
</tr>
<tr>
<td>
<div>
<div style="text-align: left">
To make use of this system and register a site,
you need the following things:
</div>
<ol style="line-height: 125%; text-align: left">
<li>
A unique name to identify your site registration
</li>
<br>
<li>
The "Redirect URL" that the OpenID plugin
for the site that you are registering requires.
</li>
<br>
<li>
Does your plugin use Post or Basic authentication?
The default is POST. If you have requirements other than those two, please contact
the CAcert OpenID development team at bmccullough@cacert.org
</li>
<br>
<li>
Optional notes for yourself.
</li>
</ol>
<p>
You may download the various URLs provided by the OpenID component
<a href="<?php echo $wellKnownURL ?>"
title="OpenID Config"
target="_blank" download="openid_configuration.json">here</a>
</p>
</div>
</td>
</tr>
<tr>
<td>
<div style="display: block; padding: 15px; width: 80%">
<br>
<form action="register.php" method="post">
<div>
<table>
<tr>
<td>
<label for="siteName">Site Name </label>
</td>
<td>
<input type="text" id="siteName" name="siteName" size="50" value=""/>
</td>
</tr>
<tr>
<td>
<label for="redirectURL">Redirect URL </label>
</td>
<td>
<input type="text" id="redirectURL" name="redirectURL" size="50"
value=""/>
</td>
</tr>
<tr>
<td>
<label for="endpointAuth">Auth Method </label>
</td>
<td>
<input type="radio" id="post_auth" name="endpointAuth" value="post"
checked/>
<label for="post_auth">Post</label>
<br>
<input type="radio" id="basic_auth" name="endpointAuth" value="basic"/>
<label for="basic_auth">Basic</label>
</td>
</tr>
<tr>
<td>
<label for="notes">Notes </label>
</td>
<td>
<input type="text" id="notes" name="notes" size="50" value=""/>
</td>
</tr>
</table>
</div>
<br>
<input type="submit" value="Register Site">
</form>
</div>
</td>
</tr>
</table>
<br>
<br>
<br>
<?php
}
echo "<div class='pageFooter'>";
echo file_get_contents("html/footer.html");
echo "<br>";
echo '<p>Copyright © CAcert, Inc ';
echo date("Y");
echo "</p>";
echo "</div>";
echo "</div>";

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

204
style.css Normal file
View file

@ -0,0 +1,204 @@
/* Transitions aren't quite as smooth on firefox */
:root {
--gradient: conic-gradient(
from 240deg at 50% 50%,
#00ffc3,
#00fad9,
#00f4f0,
#00eeff,
#00e6ff,
#00dcff,
#00d2ff,
#00c5ff,
#00b8ff,
#6da8ff,
#9f97ff,
#c285ff
);
}
*, *::before, *::after {
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
body, html {
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
body {
background-color: black;
background-image: url(scotland-travel-destination-shutterstock-512226913.jpg);
background-repeat: no-repeat;
background-size: cover;
}
.headerDiv {
display: block;
position: fixed;
top: 0;
left: 0;
}
a:link, a:visited, a:hover, a:active {
color: black;
}
.navDiv {
display: flex;
flex: auto;
align-items: center;
justify-content: center;
margin-top: 15em;
}
.navDiv a {
text-decoration: none;
}
.navDiv ul {
list-style-type: none;
color: black;
background-color: lightblue;
padding: 10px;
}
.navDiv li {
font-size: x-large;
}
input.navDiv {
display: none;
}
.scrollDiv {
overflow-y: scroll;
overflow-x: scroll;
border: 5px outset blue;
background-color: lightblue;
position: absolute;
margin: auto;
top: 10em;
width: 85%;
}
/* Define the scrollbar style */
.scrollDiv::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/* Define the thumb style */
.scrollDiv::-webkit-scrollbar-thumb {
background: linear-gradient(to bottom right, #4d7fff 0%, #1a56ff 100%);
border-radius: 5px;
}
/* Define the track style */
.scrollDiv::-webkit-scrollbar-track {
background-color: #ddd;
border: 1px solid #ccc;
}
/* Define the button style */
.scrollDiv::-webkit-scrollbar-button {
background-color: #4d7fff;
border-radius: 5px;
}
/* Define the button style when being hovered over */
.scrollDiv::-webkit-scrollbar-button:hover {
background-color: #999999;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
text-align: left;
}
.myDiv {
display: block;
/*border: 5px outset red;*/
padding: 5px;
background-color: lightblue;
text-align: center;
}
input.myDiv {
display: inline;
}
table.myDiv, th.myDiv, td.myDiv {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}
.aboutDiv {
width: 80%;
height: 60%;
position: absolute;
top: 10em;
left: 50px;
background-color: lightblue;
/*margin: 30px auto;*/
box-shadow: 0 0 2px gray;
padding: 20px;
}
/* Define the scrollbar style */
.aboutDiv::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/* Define the thumb style */
.aboutDiv::-webkit-scrollbar-thumb {
background: linear-gradient(to bottom right, #4d7fff 0%, #1a56ff 100%);
border-radius: 5px;
}
/* Define the track style */
.aboutDiv::-webkit-scrollbar-track {
background-color: #ddd;
border: 1px solid #ccc;
}
/* Define the button style */
.aboutDiv::-webkit-scrollbar-button {
background-color: #4d7fff;
border-radius: 5px;
}
/* Define the button style when being hovered over */
.aboutDiv::-webkit-scrollbar-button:hover {
background-color: #999999;
}
.instructionsDiv {
border: 5px outset blue;
background-color: lightblue;
text-align: left;
width: 50em;
padding: 15px;
padding-left: 1em;
margin: auto;
min-height: 7em;
}
.pageFooter {
width:auto;
color: black;
background: lightgrey ;
padding: 1em;
vertical-align: bottom;
}