spring-cloud-dataflow-ui icon indicating copy to clipboard operation
spring-cloud-dataflow-ui copied to clipboard

Manage navigation entry is not hidden if the user does not have ROLE_MANAGE

Open klopfdreh opened this issue 3 years ago • 6 comments

Hey,

I was expecting the menu entry to be hidden when the user does not have the role "ROLE_MANAGE" in the spring cloud data flow server ui:

image

My question is how I can make this entry not visible with "Customizing Authorization" mentioned here: https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#configuration-security-customizing-authorization

kind regards and thanks in advance.

klopfdreh avatar Apr 11 '22 10:04 klopfdreh

Maybe add [appRole]="['ROLE_MANAGE']" to the tag https://github.com/spring-cloud/spring-cloud-dataflow-ui/blob/main/ui/src/app/layout/nav/nav.component.html#L66 and remove [appRole]="[]" from https://github.com/spring-cloud/spring-cloud-dataflow-ui/blob/main/ui/src/app/layout/nav/nav.component.html#L77

klopfdreh avatar Apr 12 '22 11:04 klopfdreh

Hi @klopfdreh, ROLE_MANAGE is not meant to be used on the UI part (see the definition you pointed). We will have in the following days a discussion with the team to see how we can answer to this request.

oodamien avatar Apr 20 '22 12:04 oodamien

Hey @oodamien, yes I saw it - online for the spring boot admin actuator endpoints. Thanks for the information, I wait till your answer. 👍

klopfdreh avatar Apr 20 '22 13:04 klopfdreh

Thanks for the input, we are going to review this functionality and look into defining new roles that will make these menu options available that are separate from the current use of the role_manage for actuator endpoints.

markpollack avatar Apr 21 '22 14:04 markpollack

Sounds great! Looking forward for that implementation. You can add me as reviewer. 👍

klopfdreh avatar Apr 21 '22 18:04 klopfdreh

Hey @markpollack / @oodamien - are there any updates when this feature is going to be implemented?

Currently I am patching the UI manually so that the Manage menu entry is not shown when you don't have the ROLE_MANAGE.

Unfortunately, this is not very secure as this entry is only hidden but you can still access it when you know the path.

klopfdreh avatar Mar 08 '23 07:03 klopfdreh