REST permission : how it's work?

1
0
-1

Hi everyone,

I'm creatin an application in angular, and i'm calling some bonita function with the REST API.
But, lots of call need a permissions, like 'bpm/task', POST and GET method need the 'flownode_visualization' permissions, like it's defined in 'setup\platform_conf\current\tenants\1\tenant_portal\resources-permissions-mapping.properties'.

So i have added the permission to the profile 'user' in 'custom-permissions-mapping.properties' like this :
profile|User=[flownode_visualization]

I have restar my bundle, but it's not working.

How can I do that?

Regards,

Comments

Submitted by cmendoza on Mon, 07/23/2018 - 15:44

Hi I'm in the same current situation, Bonitasoft communty is in one server and my application is in other server.

I made the same configuration , I can login with the REST service but when I do a simple get to recover the user name. with API/system/session/unusedid

but I get every time : 401 unauthorized Error.

I know I got to sent the token but I can't recover the cookie or the response headers to store the value in a variable and send it in other Request, when I do is empty.

Please can you help me ? what is that I am mising ?

Submitted by bastien.laurent... on Mon, 07/23/2018 - 15:55

Hi cmendoza,

You need to configure your CORS on each servers to authorized the communications between each other.

But when it's will be done, you will have the same error like me (error 403).

Submitted by cmendoza on Tue, 07/24/2018 - 16:29

hi thanks for the response but :s

I already do that in the web.xml file inside the bonita folder, before that I got the problem "access-control-allow-origin", and after I configured the CORS, now I can use the Login Service API.

but alter that If I use any GET I got the 401 unauthorized Error.

please I am doing something wrong please tell me aboit it, really I don't know too much about the configuration.

1 answer

1
0
-1
This one is the BEST answer!

I had same issue but now it's working.
Go to Bonita/setup folder, pull settings from database, edit and push it back. And restart server. It should work.

1- sh setup.sh pull
2- edit setup\platform_conf\current\tenants\1\tenant_portal\dynamic-permissions-checks-custom.properties add/change profile|User=[flownode_visualization]. 
3- sh setup.sh push

Comments

Submitted by bastien.laurent... on Fri, 07/27/2018 - 14:05

Thanks !!
I had just edit my files with a serveur restart, but i never use the setup.sh pull/push.

It's work now !

Notifications