Hi,

Finally i got the solution.

Step 01
=========

Default ES *store app* contains jaggery.conf with below configurations.

"authRoles": [
                    "admin",
                    "store"

                ]


in my case i need to give API permission to store default user,
*Internal/store.
*First we need to set it into authrole on config.

"authRoles": [
                    "admin",
     "Internal/store"
                ]


Step 02
========

Normally if you have previous experiences on jaggery based apps, we all
know that we can reload jaggery app via carbon console. but in this case
Basic Auth happens on tomcat level and to reload your changes, we need to
restart the ES.

that will do the trick..!


Regards,


*Dakshika Jayathilaka*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware
0771100911


On Thu, Jun 19, 2014 at 7:05 AM, Dakshika Jayathilaka <[email protected]>
wrote:

> Hi,
>
> I need to set API permission to* internal/store* user role defined in
> Carbon User Mgt. I found some related config on jaggery.conf as below.
>
> "loginConfig": {
>         "authMethod": "BASIC"
>     },
>     "securityConstraints": [
>         {
>             "securityConstraint": {
>                 "webResourceCollection": {
>                     "name": "store",
>                     "urlPatterns": [
>                         "/apis/v1/assets/*", "/apis/v2/assets/*"],
>                     "methods": [
>                         "GET",
>                         "POST",
>                         "PUT",
>                         "DELETE",
>                         "HEAD",
>                         "OPTIONS",
>                         "TRACE",
>                         "CONNECT",
>                         "PATCH"
>                     ]
>                 },
>                 "authRoles": [
>                     "admin",
>                     "Internal/store"
>
>                 ]
>             }
>
> I tried to add *Internal/store *and seems it doesn't pickup role
> permission to basic auth. but for admin this is working fine.
>
> Any hint on this?
>
>
> Thank you,
>
> Regards,
>
> *Dakshika Jayathilaka*
> Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
> 0771100911
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to