• No replies
Roman Svystun
Roman Svystun
1 Post

Pinned topic Can't make secure JMX connection to OAuth enabled server

‏2013-11-27T09:39:07Z |

Once I add oauth-2.0 feature to the server xml configuration I'm no longer able to connect to this server using rest connector. The server always complains that the specified user has no administrative roles:

CWWKX0215E: There was a problem with the user name or password provided. The server responded with code 403 and message 'Forbidden'

0000001c A CWWKS9104A: Authorization failed for user test test :  test BasicRealm while invoking on /. The user is not granted access to any of the required roles: [Administrator].

I've tried adding the test user to oauth-roles, administrator-role and authorization-roles separately and all at once but it didn't help.

My server xml config looks like this:

<server description="oauth">
<oauth-roles id="oathrole">
<user name="test"/>
<oauthProvider id="SampleProvider" filter="request-url%=ssodemo"
allowPublicClients="true" authorizationErrorTemplate="goerror.html"
clientTokenCacheSize="780080" characterEncoding="UTF-8">
<client name="test" secret="test"
displayname="Test client number 1" redirect="http://localhost:1234/oauthclient/redirect.jsp"
enabled="true" />
<webAppSecurity allowFailOverToBasicAuth="true"/>
<basicRegistry id="basic" realm="BasicRealm">
<user name="test" password="test" />
<httpEndpoint id="defaultHttpEndpoint" httpPort="9103"
httpsPort="9104" host="*" enabled="true" />
<keyStore id="defaultKeyStore" password="test" />
<authorization-roles id="yoyo">
<security-role name="">
<user name="test" access-id="user:BasicRealm/test"></user>
<special-subject type="EVERYONE"></special-subject>

Any help is much appreciated.