-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update SessionUser for users who get tokens for multiple customers + roles #10
Comments
May be fixed when we implement dlcs/protagonist#236 |
Do they get multiple maintained sessions (maybe multiple cookies) or does a single session know about multiple logins. Even for the same customer, a user might acquire a session in different ways - clickthrough first then add Staff would actually be pretty common. |
Discussed internally on Slack, decision was to maintain a single cookie/session per customer which has access to multiple roles. |
As public class RoleProvisionToken
{
public string AccessService { get; set; }
}
public class SessionUser
{
public Dictionary<string, List<string>> AccessServiceRoles { get; set; }
} The former will be used to populate the latter if a significant gesture is required. The latter will track which AccessServiceName:Roles. In the event of a logout operation the roles provided by The same Role could be acquired in multiple ways so we may need to think about whether a logout operation removes all roles for that service, or only those that haven't also been granted by an alternative access-service. The alternative approach is to have ExampleIf a user accepts a {
"roles": [
"dlcs.io/1/clickthrough"
],
"accessServiceRoles": {
"clickthrough": [
"dlcs.io/1/clickthrough"
]
}
} If they then login via OIDC provider they may be granted {
"roles": [
"dlcs.io/1/clickthrough",
"dlcs.io/1/staff",
"dlcs.io/1/secret"
],
"accessServiceRoles": {
"clickthrough": [
"dlcs.io/1/clickthrough"
],
"oidc": [
"dlcs.io/1/clickthrough",
"dlcs.io/1/staff",
"dlcs.io/1/secret"
]
}
} What would happen in the following scenarios:
|
There might not necessarily be specific work for this but we need to validate that a user can login as multiple different customers, and/or multiple different roles for the same customer (e.g. clickthrough + roleprovider)Edit - the current iiif-auth-v2 implementation assumes a single session per customer. This has been done as an MVP with clickthrough the only provider. The login logic will need extended to check for the existence of session/cookie and update that as required.
The text was updated successfully, but these errors were encountered: