Hi Ivy Team I have a HtmlDialog containing several links to our RESTful API (implemented using Axon.ivy). However, every time the user accesses to the API, the browser requires authentication even though the user has already logged in. I'm aware of the Say the page could be like this:
The first link will require authentication whereas the second works normally. Is there a possible way to overcome this? asked 22.02.2017 at 08:26 Genzer Hawker
showing 5 of 6
show 1 more comments
|
LE Version 7.1+:Since version 7.1 the Ivy Engine is able to reuse the authenticated session for the REST service call. This was implemented with XIVY-1183. Note that the Engine will check for the CSRF (X-Requested-By) mitigation in the header. See chapter Engine REST Integration in our documentation. LTS Version 7.0.11+:We applied these changes to the LTS version 7.0.11 (story XIVY-3119). Note that by default this feature is switched off and the Engine is also not checking for the CSRF header token.
In order to enable the session reuse you need to set the following Java system properties to
For security reasons it is highly recommended to enable the CSRF mitigation when enabling the REST session reuse. answered 14.03.2019 at 10:29 Andreas Rusch 1
I`m waiting for this feature quite a while :) I`m connecting the pieces now: https://answers.axonivy.com/questions/1858/rest-service-security https://answers.axonivy.com/questions/1837/ajax-call-from-html-dialog-to-consume-web-service-and-rest-service https://answers.axonivy.com/questions/1828/using-modern-javascript-frameworks Thanks a lot for addressing it !
(29.03.2019 at 05:49)
Stelt0
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 22.02.2017 at 08:26
Seen: 4,626 times
Last updated: 22.07.2019 at 08:31
Did you try to use the plain JAX-RS api
javax.ws.rs.client.ClientBuilder.newClient()
and re-use the returned instance of the client?Hi @Reguel Wermelinger, I want to expose and then let the user consumes the RESTful API from the browser. In my setup, the RESTful classes and the JSF page are in the same project.
How did the user authenticate to access the HtmlDialog? I guess that if Basic AUTH was used to access the dialog, then the authentication headers will also be sent to follow up requests and therefore work for the REST api.
The user is authenticated (
Developer
on designer). Even if the headerCookie:JSESSIONID=XXXX; oam.Flash.RENDERMAP.TOKEN=-yyyyyy
is transfered but it still require to input username and password. It seems the headerBasic XXXX
is not present so it (Jersey) will automatically assume theUserPrinciple
is not initialized. The filter does not check the Cookie though.Hi @Reguel Wermelinger, via an internal resource, I know that the JIRA issue XIVY-1183 will address the problem I asked. Looking forward to version 6.6. Please add the answer once the feature is implemented.
You asked also "I'm aware of the javax.annotation.security.PermitAll/DenyAll (-- which seems to be the only annotations supported?":
We support next to
@DenyAll
and@PermitAll
also@RolesAllowed
. Look at thecom.axonivy.connectivity.rest.provider.SecureService
class in the Axon.ivy sample project "ConnectivityDemos".