Skip to content
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

Refactor AuthTokens to improve process of adding new IdPs #360

Open
gregcorbett opened this issue Jun 30, 2022 · 2 comments
Open

Refactor AuthTokens to improve process of adding new IdPs #360

gregcorbett opened this issue Jun 30, 2022 · 2 comments

Comments

@gregcorbett
Copy link
Member

Adding a new IdP feels more cumbersome now we have identity linking (maybe it's always been somewhat cumbersome).

The new IdP has to be added in three place.

  1. MyConfig1.php to enable GOCDB to resolve the info the new IdP gives it into an ID String
  2. A mapping of AuthTokens to authentication realms hardcoded in the User Service.
  3. In the PI code in order to expose the new ID Strings to the outside world.

I think point 2 can be addressed with some refactoring of the AuthTokens, such that one AuthToken class corresponds to one IdP. Though this is probably best attempted once we have dropped shibboleth support and only support OIDC. One AuthToken can then correspond to one authentication realm and the getAuthTypes could loop through $myConfig1->getAuthTokenClassList(); to determine a list of possible auth types - similar to what it does now, but without the need for the hardcoded mapping in this file (pushing it into the tokens - which feels like a better place for it).

I think point 3 could be solved in a similar way, by referencing $myConfig1->getAuthTokenClassList(); and a mapping in the token itself between AuthToken and API XML tag.

@gregcorbett
Copy link
Member Author

Related: #324 (comment)

it seems a bit lazy to go to the trouble of creating unique, name-spaced authentication class identifiers and then just check the short substrings Shib, X509 and IAM.

@gregcorbett
Copy link
Member Author

I think point 2 can be addressed with some refactoring of the AuthTokens, such that one AuthToken class corresponds to one IdP.

#430 goes some way to achieving this for OIDC based integrations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant