Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Added Authorization implementation according latest plugin #1014

Merged
merged 14 commits into from
Feb 12, 2019
Merged

Conversation

Kunal-Jha
Copy link
Contributor

@Kunal-Jha Kunal-Jha commented Jan 30, 2019

One-line summary

Zalando ticket : ARUHA-2132
Added Authorization implementation according latest plugin

Description

Made Changes to Nakadi according to the new plugin api interfaces. All the allAuthorizationAttributeValid are changed except for admin authorization where permissions are used.

Review

  • Tests
  • Documentation

@@ -48,6 +48,7 @@ public void setCreatedAt(final DateTime createdAt) {
this.createdAt = createdAt;
}


Copy link
Contributor

Choose a reason for hiding this comment

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

✂️

Copy link
Contributor

Choose a reason for hiding this comment

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

@Kunal-Jha please address this comment as well

@Kunal-Jha Kunal-Jha changed the title Aruha2132 Added Authorization implementation according latest plugin Feb 4, 2019
@@ -100,7 +100,7 @@ public void validateSubscriptionChange(final Subscription old, final Subscriptio
if (!Objects.equals(newValue.getInitialCursors(), old.getInitialCursors())) {
throw new SubscriptionUpdateConflictException("Not allowed to change initial cursors");
}
authorizationValidator.validateAuthorization(old.getAuthorization(), newValue.getAuthorization());
authorizationValidator.validateAuthorization(old.asResource(), newValue.asBaseResource());
Copy link
Contributor

Choose a reason for hiding this comment

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

As you call newValue.asBaseResource() - it will create a resource without a name. I think it's fine to create a resource without a name for a subscription that is not created yet, but in this user modifies subscription that already exists so I think the id should be used as a resource name.

Copy link
Contributor Author

@Kunal-Jha Kunal-Jha Feb 6, 2019

Choose a reason for hiding this comment

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

added in the commit

@rcillo
Copy link
Contributor

rcillo commented Feb 11, 2019

@Kunal-Jha please, check the comments once more. I think we have only some minor things and it's missing a merge from master.

@Kunal-Jha
Copy link
Contributor Author

@rcillo Apologies!! somehow I missed that :( . . Added the new commits.

@rcillo
Copy link
Contributor

rcillo commented Feb 12, 2019

👍

@Kunal-Jha
Copy link
Contributor Author

👍

@Kunal-Jha Kunal-Jha merged commit 6b14082 into master Feb 12, 2019
@Kunal-Jha Kunal-Jha deleted the aruha2132 branch February 12, 2019 12:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants