Skip to content

Conversation

@sbernauer
Copy link
Member

@sbernauer sbernauer commented Feb 20, 2024

Description

Closes #400

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes
# Author
- [x] Changes are OpenShift compatible
- [x] CRD changes approved
- [x] CRD documentation for all fields, following the [style guide](https://docs.stackable.tech/home/nightly/contributor/docs-style-guide).
- [x] Integration tests passed (for non trivial changes)
- [x] Changes need to be "offline" compatible
# Reviewer
- [x] Code contains useful comments
- [x] Code contains useful logging statements
- [x] (Integration-)Test cases added
- [x] Documentation added or updated. Follows the [style guide](https://docs.stackable.tech/home/nightly/contributor/docs-style-guide).
- [x] Changelog updated
- [x] Cargo.toml only contains references to git tags (not specific commits or branches)
# Acceptance
- [ ] Feature Tracker has been updated
- [ ] Proper release label has been added

@sbernauer sbernauer marked this pull request as ready for review February 20, 2024 14:27
@sbernauer sbernauer self-assigned this Feb 20, 2024
@NickLarsenNZ NickLarsenNZ self-requested a review February 21, 2024 07:55
NickLarsenNZ
NickLarsenNZ previously approved these changes Feb 21, 2024
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

LGTM

@sbernauer
Copy link
Member Author

In terms of CRD change we have two options:

1. Enable authorizer and group-mapper simultaneous

  # Enable authorizer and group-mapper at the same time
  clusterConfig:
    authorization: # optional
      opa: # mandatory
        configMapName: opa # mandatory
        package: hdfs # mandatory
  • Good, because consistent and users can not enable authZ and forget about group mapping
  • Good, because rego rules can rely on the groups being propagated (although not recommended)

2. Enable authorizer and group-mapper separately

  clusterConfig:
    authorization: # optional
      opaAuthorization: # mandatory
        configMapName: opa # mandatory
        package: hdfs # mandatory
      opaGroupMapping: # optional
        configMapName: opa # mandatory
        package: hdfs # mandatory
  • Good, because more flexible, e.g. you can enable AuthZ without group mapping (which you basically would get for free)
  • Bad, because more complex and error-prone

Originally I was thinking of 2., but now I am in favor of 1., as it's simpler and more consistent and 2. only enables stuff we should probably not support :)
User can always use configOverrides to easily partially enabled stuff when they really really want to.

@sbernauer
Copy link
Member Author

@adwk67 adwk67 self-requested a review February 27, 2024 13:42
Copy link
Member

@adwk67 adwk67 left a comment

Choose a reason for hiding this comment

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

Just reviewed the docs so far with a few comments. Nit: we use regorule, rego rule and rego-rule here: I don't mind which it is but we should be consistent. The opa docs seem to use two separate words i.e. rego rules.

@sbernauer
Copy link
Member Author

@adwk67 feedback should be addressed

@sbernauer sbernauer requested a review from adwk67 February 28, 2024 12:34
@sbernauer
Copy link
Member Author

adwk67
adwk67 previously approved these changes Feb 28, 2024
Copy link
Member

@adwk67 adwk67 left a comment

Choose a reason for hiding this comment

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

LGTM! Can merge when the CI tests are all done.

Copy link
Member

@adwk67 adwk67 left a comment

Choose a reason for hiding this comment

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

LGTM! Can merge when the CI tests are all done.

@sbernauer
Copy link
Member Author

@sbernauer
Copy link
Member Author

Another full testsuite run, after I increased the resources in stackabletech/ci@40937a9:
https://ci.stackable.tech/view/02%20Operator%20Tests%20(custom)/job/hdfs-operator-it-custom/131/

@sbernauer
Copy link
Member Author

Full testsuite passed 🚀

@sbernauer sbernauer added this pull request to the merge queue Feb 28, 2024
Merged via the queue into main with commit 4505bf7 Feb 28, 2024
@sbernauer sbernauer deleted the feat/opa-authorizer branch February 28, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Implement Authorizer

4 participants