Skip to content
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

[BZ-1403939] @javax.jws.Oneway causes security-context to be lost #17

Open
wants to merge 1 commit into
base: jboss-2.7.18.SP
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import org.apache.cxf.headers.Header;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.interceptor.OneWayProcessorInterceptor;
import org.apache.cxf.message.Message;
import org.apache.cxf.message.MessageImpl;

Expand Down Expand Up @@ -89,6 +90,20 @@ public Map<String, String> getEnvelopeNs() {
public boolean hasAdditionalEnvNs() {
Map<String, String> ns = getEnvelopeNs();
return ns != null && !ns.isEmpty();
}
}

@Override
public Object getContextualProperty(String key) {
Object property = super.getContextualProperty(key);

// BZ-1403939 Picketbox uses thread local variables for authorization. By running in another thread,
// these will be lost.
if (OneWayProcessorInterceptor.USE_ORIGINAL_THREAD.equals(key)) {
setContextualProperty(OneWayProcessorInterceptor.USE_ORIGINAL_THREAD, true);
return true;
}

return property;
}

}