---------- Forwarded message ----------
From:
Jim Ma <ema@redhat.com>Date: Wed, May 30, 2018 at 9:03 AM
Subject: Set an authorized identity to EltyronSecurity Context
To: Darran Lofthouse <
darran.lofthouse@redhat.com>
Cc: Alessio Soldano <
asoldano@redhat.com>
Hi Darran,
We are helping look at a customer issue which requires propagate the authenticated subject from webservice subsystem to
ejb subystem. With old security domain , we can do this with creating a subject :
@Override
public void pushSubjectContext(final Subject subject, final Principal principal, final Object credential) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
SecurityContext securityContext = SecurityContextAssociation.getSecurityContext();
if (securityContext == null) {
securityContext = createSecurityContext(getSecurityDomain());
setSecurityContextOnAssociation(securityContext);
}
securityContext.getUtil().createSubjectInfo(principal, credential, subject);
return null;
}
});
}
After Elytron, what is the equivalent thing to do this then ejb can retrieve this security without check this twice ?
Thanks,
Jim