Search in sources :

Example 1 with NimbusPrincipal

use of org.apache.storm.security.auth.NimbusPrincipal in project storm by apache.

the class BlobStoreTest method getNimbusSubject.

//Gets Nimbus Subject with NimbusPrincipal set on it
public static Subject getNimbusSubject() {
    Subject nimbus = new Subject();
    nimbus.getPrincipals().add(new NimbusPrincipal());
    return nimbus;
}
Also used : NimbusPrincipal(org.apache.storm.security.auth.NimbusPrincipal) Subject(javax.security.auth.Subject)

Example 2 with NimbusPrincipal

use of org.apache.storm.security.auth.NimbusPrincipal in project storm by apache.

the class BlobStoreTest method getNimbusSubject.

// Gets Nimbus Subject with NimbusPrincipal set on it
public static Subject getNimbusSubject() {
    Subject nimbus = new Subject();
    nimbus.getPrincipals().add(new NimbusPrincipal());
    return nimbus;
}
Also used : NimbusPrincipal(org.apache.storm.security.auth.NimbusPrincipal) Subject(javax.security.auth.Subject)

Example 3 with NimbusPrincipal

use of org.apache.storm.security.auth.NimbusPrincipal in project storm by apache.

the class BlobStoreAclHandler method isNimbus.

private boolean isNimbus(Subject who) {
    Set<Principal> principals;
    boolean isNimbusInstance = false;
    if (who != null) {
        principals = who.getPrincipals();
        for (Principal principal : principals) {
            if (principal instanceof NimbusPrincipal) {
                isNimbusInstance = true;
            }
        }
    }
    return isNimbusInstance;
}
Also used : NimbusPrincipal(org.apache.storm.security.auth.NimbusPrincipal) NimbusPrincipal(org.apache.storm.security.auth.NimbusPrincipal) Principal(java.security.Principal)

Example 4 with NimbusPrincipal

use of org.apache.storm.security.auth.NimbusPrincipal in project storm by apache.

the class BlobStoreUtils method getNimbusSubject.

public static Subject getNimbusSubject() {
    Subject subject = new Subject();
    subject.getPrincipals().add(new NimbusPrincipal());
    return subject;
}
Also used : NimbusPrincipal(org.apache.storm.security.auth.NimbusPrincipal) Subject(javax.security.auth.Subject)

Aggregations

NimbusPrincipal (org.apache.storm.security.auth.NimbusPrincipal)4 Subject (javax.security.auth.Subject)3 Principal (java.security.Principal)1