[
https://issues.jboss.org/browse/TEIID-3763?page=com.atlassian.jira.plugin...
]
Kylin Soong commented on TEIID-3763:
------------------------------------
Please ignore my #1 comment, my previous thought is totally wrong, from JCA specification,
security related stuff are only related with ConnectionManager which are
implemented/maintained by Application Server(ironjacamar in JBoss),
ManagedConnectionFactory no responsibility to handle security.
If use ironjacamar deploy webservice outbound resource adapter, then set security to
ironjacamar, this may a possible solution for running WS connector oauth security in
embedded, but I am not test.
Another founding of me is that the Oauth security related LoginModule and Credential are
not really executed authentication, the real authentication executed manually by
teiid-oauth-util.sh, Oauth security related LoginModule and Credential just pass
teiid-oauth-util.sh authentication results to cxf WebClient, set as header like
{code}
OAuthClientUtils.Consumer consumer = new OAuthClientUtils.Consumer(consumerKey,
consumerSecret);
OAuthClientUtils.Token token = new OAuthClientUtils.Token(accessToken, accessSecret);
String auth = OAuthClientUtils.createAuthorizationHeader(consumer, token, httpMethod,
resourceURI);
...
WebClient client = ...
client.header("Authorization", auth)
{code}
consumerKey, consumerSecret, accessToken, accessSecret are all get manually, so in this
term, we do not use the JAAS mechanism, we just path there properties as translator import
properties, then used in connector directly, this also helpful for Teiid Designer to
develop UI, also helpful Swagger translator develop.
Also, in terms of Oauth 2, do not need set consumerKey, consumerSecret, accessToken,
accessSecret as header, it only need set access_token as request parameter, we may need
think add OAuth 2 SecurityType in WSManagedConnectionFactory.
WS connector oauth security setting not work in Embedded
--------------------------------------------------------
Key: TEIID-3763
URL:
https://issues.jboss.org/browse/TEIID-3763
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12
Reporter: Kylin Soong
Fix For: 8.12.x
Attachments: jca-ra-outbound.png
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)