-
Notifications
You must be signed in to change notification settings - Fork 59
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
Support multi-tenancy (dynamic configuration selection) #239
Comments
I've removed the milestone at the moment until we agree on some final option. In both (and likely other) cases the extra complexity is that the implementation would have to manually parse the headers first and then once the configuration is chosen - get the underlying JOSE library to parse it (and the whole token again). In our experience the tenant selection is often driven by the HTTP request properties as opposed to the token content. |
I would go for option2 as you also indicate that providers need to set a As you also mention, besides the token, the (HTTP) Request as a whole should also be passed to that method. |
@rdebusscher thanks for the comments.
Right - that can be problematic as it can be hard to come up with a portable representation of HTTP properties which work for all the containers :-). I suppose it can be implicit - the interface implementations can inject |
Alternative for multi-tenancy support (too make things easier instead of having to setup every 'source' separately)
|
@teddyjtorres and @ayoho have had an interesting idea about supporting more than one
issuer
for a single MP JWT endpoint.During the 2 latest MP JWT calls/notes it was agreed that rather than overloading each MP JWT configuration property (ex,
mp.jwt.issuer=iss1, iss2
where each of these issuers may have its own token security requirements) it would be better to follow a multi-tenancy principle or simply, select the MP JWT configuration sets atomically, depending on the properties of the current token.Option1
Teddy and Adam liked the idea of starting with the static tenant-specific configuration, for example:
where
my-tenant
is the value of either JWS or JWEtenantId
header.Option2
Introduce an injectable interface which would return the current set of properties - it will accept a map of the token headers and return the matching set. Fallback works the same way as in
Option1
.CC @radcortez @rdebusscher
The text was updated successfully, but these errors were encountered: