-
Notifications
You must be signed in to change notification settings - Fork 9
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
Updating API to separate session handling from GetAuthenticationModes
#7
Conversation
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.
Just a couple of minor issues (comments + mutex missing if I am correct), and then, good to merge!
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.
that + missing updates
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.
LGTM, feel free to merge!
This change is to keep the naming aligned with the specification
We updated the API to separate the GetAuthenticationModes call from session handling, since (in order to support MFA) we need GAM to be called multiple times per session.
Since those are no-op, it's best to separate the diff from the broker that actually matters (for now).
We were not locking the mutexes when reading from the maps and this could result in races as well. Now we also check if the session still exists before modifying the map, otherwise we would just recreate it accidentaly Some variables were renamed for more consistency between the functions and their meaning
27cae89
to
0ff9466
Compare
We used to start a new session and already return the supported authentication modes when the user selected a broker to use for authentication. In order to support MFA, we need to be able to call GetAuthenticationModes multiple times per session, which is not compatible with the way its currently implemented.
This PR splits
SelectBroker
into two different methods:SelectBroker
, which starts a new session for the specified user and associates a broker to the created session;GetAuthenticationModes
, which fetches a list of supported authentication modes that are available for the given session;UDENG-1125