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 Flemish government provider to support LeerID #5446

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Mar 20, 2024

This pull request adds support for LeerID.

In order to add this support I refactored the existing OIDC omniauth strategy.

First of all I renamed this strategy to FlemishGovernment.
I did this rename as the strategy included a lot of Flemish government specific fixes. And other strategies that need OpenIDConnect, such as surf and elixir, extend from the OpenIDConnect strategy directly instead of from our specific OIDC version.

This rename allowed me to move the client_id and issuer from our database to our credentials.

It also removed the need for all the code that kept track of the provider id. Instead the provider is now based on the institution information like most other strategies. For LeerID I used the ov_orgcode for this. If this is not present it defaults to the Flemish government.

This rename also results in the rename of the path, which should then also be updated by the flemish government.

I also simplified the code in the lib files to more closely match the structure used for Surf and Elixir. This makes them easier to compare and comprehend.

  • Tested on naos
  • Edit provider 904 on naos and in production
  • verify userinfo change
    As we no longer overwrite the open_id_connect 'userinfo' method, an extra request is made to the userinfo endpoint of the flemish government. This is in line with the general specification, but not necessarily with the flemish government implementation.
    As there was little documentation with the old implementation it is unclear if avoiding this extra request was intended behavior or an unintended side effect of the monkey patch.

Closes #4164

@jorg-vr jorg-vr added the feature New feature or request label Mar 20, 2024
@jorg-vr jorg-vr self-assigned this Mar 20, 2024
@jorg-vr
Copy link
Contributor Author

jorg-vr commented Mar 20, 2024

I'm not sure about the new name ACM-IDM, as the dash is not posible in variable names, and the abbreviation might not be well known. I am op to other suggestions. 'VlaamsOverheid' nor 'LeerID' seem broad enough as name.

Edit: I opted for the name FlemishGovernment

@jorg-vr jorg-vr changed the title Refactor ACM-IDM provider to support LeerID Refactor Flemish government provider to support LeerID Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LeerID
1 participant