diff --git a/config/gocdb_schema.xml b/config/gocdb_schema.xml index 9f087392d..48c44acff 100644 --- a/config/gocdb_schema.xml +++ b/config/gocdb_schema.xml @@ -583,7 +583,7 @@ TYPE 255 - /^(X509|OIDC Subject)$/ + /^(X.509|OIDC Subject)$/ diff --git a/htdocs/PI/write/utils.php b/htdocs/PI/write/utils.php index 3e44ce85e..966d1d8c0 100644 --- a/htdocs/PI/write/utils.php +++ b/htdocs/PI/write/utils.php @@ -63,7 +63,7 @@ function returnJsonWriteAPIResult ($httpResponseCode, $object) { function getAuthenticationInfo () { require_once __DIR__ . '/../../web_portal/components/Get_User_Principle.php'; #Check if associated cert/token is set to define identifier type - if(isset($_SERVER['SSL_CLIENT_CERT'])){$identifierType = 'X509';} + if(isset($_SERVER['SSL_CLIENT_CERT'])){$identifierType = 'X.509';} if(isset($_SERVER['OIDC_access_token'])){$identifierType = 'OIDC Subject';} #This will return null if no cert is presented diff --git a/htdocs/web_portal/controllers/site/add_api_auth.php b/htdocs/web_portal/controllers/site/add_api_auth.php index 1dd9b51b9..dc1a228db 100644 --- a/htdocs/web_portal/controllers/site/add_api_auth.php +++ b/htdocs/web_portal/controllers/site/add_api_auth.php @@ -58,7 +58,7 @@ function draw(\User $user = null, \Site $site = null) { $params['site'] = $site; $params['authTypes'] = array(); - $params['authTypes'][]='X509'; + $params['authTypes'][]='X.509'; $params['authTypes'][]='OIDC Subject'; show_view("site/add_api_auth.php", $params); diff --git a/htdocs/web_portal/controllers/site/edit_api_auth.php b/htdocs/web_portal/controllers/site/edit_api_auth.php index 3120cca85..d9310ce14 100644 --- a/htdocs/web_portal/controllers/site/edit_api_auth.php +++ b/htdocs/web_portal/controllers/site/edit_api_auth.php @@ -60,7 +60,7 @@ function draw(\User $user = null, \APIAuthentication $authEnt = null, \Site $sit $params['site'] = $site; $params['authEnt'] = $authEnt; $params['authTypes'] = array(); - $params['authTypes'][]='X509'; + $params['authTypes'][]='X.509'; $params['authTypes'][]='OIDC Subject'; show_view("site/edit_api_auth.php", $params); diff --git a/lib/Gocdb_Services/Site.php b/lib/Gocdb_Services/Site.php index 9086eb6ec..6f507f94a 100644 --- a/lib/Gocdb_Services/Site.php +++ b/lib/Gocdb_Services/Site.php @@ -1405,8 +1405,8 @@ public function addAPIAuthEntity(\Site $site, \User $user, $newValues) { //If the entity is of type X509, do a more thorough check than the validate service (as we know the type) //Note that we are allowing ':' as they can appear in robot DN's - if ($type == 'X509' && !preg_match("/^(\/[A-Za-z]+=[a-zA-Z0-9\/\-\_\s\.,'@:\/]+)*$/", $identifier)) { - throw new \Exception("Invalid x509 DN"); + if ($type == 'X.509' && !preg_match("/^(\/[A-Za-z]+=[a-zA-Z0-9\/\-\_\s\.,'@:\/]+)*$/", $identifier)) { + throw new \Exception("Invalid X.509 DN"); } //If the entity is of type OIDC subject, do a more thorough check again @@ -1489,8 +1489,8 @@ public function editAPIAuthEntity(\APIAuthentication $authEntity, \User $user, $ //If the entity is of type X509, do a more thorough check than the validate service (as we know the type) //Note that we are allowing ':' as they can appear in robot DN's - if ($type == 'X509' && !preg_match("/^(\/[A-Za-z]+=[a-zA-Z0-9\/\-\_\s\.,'@:\/]+)*$/", $identifier)) { - throw new \Exception("Invalid x509 DN"); + if ($type == 'X.509' && !preg_match("/^(\/[A-Za-z]+=[a-zA-Z0-9\/\-\_\s\.,'@:\/]+)*$/", $identifier)) { + throw new \Exception("Invalid X.509 DN"); } //If the entity is of type OIDC subject, do a more thorough check again