public class IssuerAndSubjectAwareRequestAuthorizationFilter extends RulesAwareRequestAuthorizationFilter
If a request does not specify the subject, the subject is assumed to be the issuer.
A concrete use case for this would be if you have a service that is only allowed to specify certain users as the
subject. For example, if "impersonation-service" is allowed to use any @atlassian.com users as the
subject, you could define a set of rules like this:
ImmutableMap.of("impersonation-service", Pattern.compile(".*@atlassian\\.com").asPredicate())
| Constructor and Description |
|---|
IssuerAndSubjectAwareRequestAuthorizationFilter(Map<String,Predicate<String>> issuersAndSubjectChecks) |
| Modifier and Type | Method and Description |
|---|---|
static IssuerAndSubjectAwareRequestAuthorizationFilter |
issuers(Set<String> issuers)
A helper constructor to construct a filter from a list of issuers.
|
isAuthorizeddestroy, doFilter, init, onAuthorizationFailure, onAuthorizationSuccess, onTokenNotFoundpublic static IssuerAndSubjectAwareRequestAuthorizationFilter issuers(Set<String> issuers)
Issuers cannot impersonate anybody. The issuer must be the same as the subject. (The subject may be blank, in which case we treat the issuer as the subject).
issuers - A list of issuers to whitelistCopyright © 2017 Atlassian. All rights reserved.