-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add config for identity_providers in local_info.xml #524
base: dev
Are you sure you want to change the base?
Add config for identity_providers in local_info.xml #524
Conversation
} | ||
|
||
$this->principal = $_SERVER['voPersonID']; | ||
$this->userDetails = ['AuthenticationRealm' => [$provider['idp']]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably shouldn't just be the IdP. For EGI Check In, it should be "EGI Proxy IdP" - this should defined in the local config in the provider
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep Make sense. Added this in 7e7396c
694c0b2
to
7e7396c
Compare
7e7396c
to
11b2a67
Compare
<authentication_realms> | ||
<shib_realm_name>EGI Proxy IdP</shib_realm_name> | ||
</authentication_realms> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can just be authentication_realm
<authentication_realms> | |
<shib_realm_name>EGI Proxy IdP</shib_realm_name> | |
</authentication_realms> | |
<authentication_realm> | |
EGI Proxy IdP | |
</authentication_realm> |
<authentication_realms> | ||
<shib_realm_name>EGI Proxy IdP</shib_realm_name> | ||
</authentication_realms> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As with https://github.com/GOCDB/gocdb/pull/524/files#r1842006878
<authentication_realms> | |
<shib_realm_name>EGI Proxy IdP</shib_realm_name> | |
</authentication_realms> | |
<authentication_realm> | |
EGI Proxy IdP | |
</authentication_realm> |
if (empty($_SERVER['voPersonID'])) { | ||
die( | ||
"Did not receive required attributes from the " | ||
. "IDP $name to complete authentication. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will read better
. "IDP $name to complete authentication. " | |
. "$name to complete authentication. " |
if (empty($_SERVER['entitlement'])) { | ||
die( | ||
"Did not receive the required entitlement " | ||
. "attribute from the IDP $name. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will read better
. "attribute from the IDP $name. " | |
. "attribute from the $name. " |
) { | ||
$HTML = "<ul>" | ||
. "<li>Login requires a GOCDB entitlement value " | ||
. "which was not provided for the IDP $name.</li>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will read better
. "which was not provided for the IDP $name.</li>" | |
. "which was not provided for the $name.</li>" |
|
||
$this->principal = $_SERVER['voPersonID']; | ||
$this->userDetails = [ | ||
'AuthenticationRealm' => $provider['authenticationRealms'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given https://github.com/GOCDB/gocdb/pull/524/files#r1842006878, this will need a slight tweak
$localInfo = $this->GetLocalInfoXML(); | ||
$identityProviders = []; | ||
|
||
if (!empty($localInfo->identity_providers->provider)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens here if identity_providers
is omitted in it's entirety from the local_config.xml
?
if (!empty($localInfo->identity_providers->provider)) { | ||
foreach ( | ||
$localInfo | ||
->identity_providers | ||
->provider as $providerDetails | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this I think would read better
if (!empty($localInfo->identity_providers->provider)) { | |
foreach ( | |
$localInfo | |
->identity_providers | |
->provider as $providerDetails | |
) { | |
$configured_providers = $localInfo->identity_providers->provider; | |
if (!empty($configured_providers)) { | |
foreach ($configured_providers as $providerDetails) { |
|
||
/** authentication_realms */ | ||
$authenticationRealms = []; | ||
if ($providerDetails->authentication_realms) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given https://github.com/GOCDB/gocdb/pull/524/files#r1842006878, this will need a slight tweak
$identityProviders[] = [ | ||
'idp' => $idp, | ||
'name' => $name, | ||
'authenticationRealms' => $authenticationRealms, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given https://github.com/GOCDB/gocdb/pull/524/files#r1842006878
'authenticationRealms' => $authenticationRealms, | |
'authenticationRealm' => $authenticationRealm, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor changes are needed.
Resolves GT-472 and GT-471