[keycloak-user] HTTP 403 Forbidden while connecting to bearer only application
Arjit Agrawal
arjit.agrawal.07 at gmail.com
Thu Jun 4 10:17:09 EDT 2015
Hi,
I have the war file of service bearer only application in *jboss
deployments folder, *the auth-server.war for keycloak is also at the same
location.
Roles configured:-
[image: Inline image 1]
Here' my web.xml for service bearer only application:-
[image: Inline image 2]
Here's the setting for the bearer only application in keycloak
[image: Inline image 3]
User Role Mappings
[image: Inline image 1]
I am using REST services to fulfill the request. Here's a snippet of code:-
*KeycloakSecurityContext securityContext = (KeycloakSecurityContext)
httpRequest*
* .getAttribute(KeycloakSecurityContext.class.getName());*
*AccessToken accessToken = securityContext.getToken();*
OAuth Client Scope Mappings:-
[image: Inline image 2]
Please let me know, if any more information is required.
Regards,
Arjit Agrawal
On Thu, Jun 4, 2015 at 6:02 PM, Stian Thorgersen <stian at redhat.com> wrote:
> We'll need much more info here. How have you secured the app? Is it a WAR?
> Do you require any roles for the resource you're invoking? Are you sending
> a bearer token with the request? How do you get the request? Does the user
> have the required roles? Does the client have the required scope?
>
> ----- Original Message -----
> > From: "Arjit Agrawal" <arjit.agrawal.07 at gmail.com>
> > To: "keycloak-user" <keycloak-user at lists.jboss.org>
> > Sent: Thursday, 4 June, 2015 5:49:08 AM
> > Subject: [keycloak-user] HTTP 403 Forbidden while connecting to bearer
> only application
> >
> > Hi,
> >
> > I have a new application - 'testapi' under a new realm - 'testrealm'.
> This
> > application is to be used as an API. Its an bearer only application .
> >
> > I have also made an OAuth Client to access this service.
> >
> > I am using iOS AeroGear plugin in my project to connect to API service
> with
> > all the required creditionals like clientId, roles etc.
> >
> > Version of Keycloak - 1.0-beta3 .
> > Version of Jboss - JBoss AS 7.1.1
> >
> > Its hosted on Amazon AWS . (I tried the same in my local environment it
> was
> > working but when i have done the same on Amazon server, i am getting this
> > issue.)
> >
> >
> > Thanks for any help on this one.
> >
> > Regards,
> > Arjit Agrawal
> >
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
>
--
Arjit Agrawal
AKGEC, Ghaziabad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 29442 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0005.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 25982 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0006.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 17372 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0007.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 22110 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0008.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 34590 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20150604/80cd45c4/attachment-0009.png
More information about the keycloak-user
mailing list