[
https://issues.jboss.org/browse/TEIID-3763?page=com.atlassian.jira.plugin...
]
Kylin Soong commented on TEIID-3763:
------------------------------------
After debug some code, I think if we add a Subject variable to
WSManagedConnectionFactory,
{code}
WSManagedConnectionFactory mcf = new WSManagedConnectionFactory();
mcf.setSecurityType("OAuth");
mcf.setSubject(subject);
server.addConnectionFactory("java:/twitterDS", mcf.createConnectionFactory());
{code}
then in WSConnectionImpl add the following logic
{code}
if(mcf.getSubject() != null){
ConnectionContext.addSubject(mcf.getSubject() );
}
//setDispatchProperties
ConnectionContext.addSubject(null);
{code}
The Subject can get via picketbox standalone, more details refer to Embedded Security
doc.
WS connector security setting not work in Embedded
--------------------------------------------------
Key: TEIID-3763
URL:
https://issues.jboss.org/browse/TEIID-3763
Project: Teiid
Issue Type: Feature Request
Components: Misc. Connectors
Affects Versions: 8.13
Reporter: Kylin Soong
Assignee: Steven Hawkins
Fix For: 8.13
In WSConnectionImpl setDispatchProperties setting depend on Security Subject:
{code}
else if (this.mcf.getAsSecurityType() == WSManagedConnectionFactory.SecurityType.OAuth)
{
Subject subject = ConnectionContext.getSubject();
if (subject != null) {
}
...
}
{code}
Note if run WS connector with security in Embedded, ConnectionContext.getSubject() return
null, the cause exception throw.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)