Skip to content

CORE-18171: Adjust rest permissions for password change #5402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Tom-Fitzpatrick
Copy link
Contributor

@Tom-Fitzpatrick Tom-Fitzpatrick commented Jan 9, 2024

This PR adds an AuthorizationProvider to the RestResource interface. This allows rest resources to provide custom authorization logic for particular routes, by overriding the default method in AuthorizationProvider.

This is used in UserEndpointImpl to ensure that the changeUserPasswordSelf method can always be called by a user, regardless of their permissions.

Once this is merged, https://github.com/corda/corda-e2e-tests/pull/402 will enable further e2e tests which cover various permission scenarios.

@Tom-Fitzpatrick Tom-Fitzpatrick force-pushed the tomf/CORE-18171/adjust-rest-permissions-for-password-change branch 2 times, most recently from 9d264f8 to 333b963 Compare January 12, 2024 15:17
@corda-jenkins-ci02
Copy link
Contributor

corda-jenkins-ci02 bot commented Jan 12, 2024

Jenkins build for PR 5402 build 22

Build Successful:
Jar artifact version produced by this PR: 5.2.0.0-alpha-1705402890067
Helm chart version produced by this PR: 5.2.0-alpha.1705402890067
Helm chart pushed to: oci://corda-os-docker-dev.software.r3.com/helm-charts/pr-5402/corda

@Tom-Fitzpatrick Tom-Fitzpatrick marked this pull request as ready for review January 15, 2024 08:54
@Tom-Fitzpatrick Tom-Fitzpatrick requested a review from a team as a code owner January 15, 2024 08:54
@Tom-Fitzpatrick
Copy link
Contributor Author

build e2e PR-402

@Tom-Fitzpatrick
Copy link
Contributor Author

Copy link
Contributor

@vkolomeyko vkolomeyko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine in principle, few comments posted.

@vkolomeyko vkolomeyko requested a review from a team January 16, 2024 09:05
vkolomeyko
vkolomeyko previously approved these changes Jan 16, 2024
Copy link
Contributor

@vkolomeyko vkolomeyko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

One minor suggestion posted.

Copy link
Contributor

@vkolomeyko vkolomeyko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>

update fix imports

Signed-off-by: TomFitzpatrick <[email protected]>

detekt

Signed-off-by: TomFitzpatrick <[email protected]>

detekt

Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
Signed-off-by: TomFitzpatrick <[email protected]>
@Tom-Fitzpatrick Tom-Fitzpatrick force-pushed the tomf/CORE-18171/adjust-rest-permissions-for-password-change branch from fe7274b to 0b00e51 Compare January 16, 2024 11:00
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

3 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Tom-Fitzpatrick Tom-Fitzpatrick merged commit caf3f19 into release/os/5.2 Jan 16, 2024
@Tom-Fitzpatrick Tom-Fitzpatrick deleted the tomf/CORE-18171/adjust-rest-permissions-for-password-change branch January 16, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants