-
-
Notifications
You must be signed in to change notification settings - Fork 4
Deploy userinfofetcher regorules #580
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
Merged
Merged
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
455bdc4
Add group fetcher container
nightkr 63ee375
Spike group fetcher functionality
nightkr bca2d62
Rename group fetcher to user info fetcher
nightkr 9c1098c
Generalize enrichment endpoints to have room for arbitrary user info
nightkr 8b28fd4
Expose user roles
nightkr a5bbe88
Make UIF configurable
nightkr 08823b7
Make UIF credentials configurable too
nightkr 412e542
OPA 0.45 -> 0.51
nightkr 22507d0
Broke out UIF into its own crate
nightkr cffa188
UIF error handling
nightkr c74b6d9
Ingest custom attributes
nightkr 1ef78e8
Shut down on SIGTERM
nightkr 67e411f
Split keycloak backend out into separate module
nightkr eb134b7
Fix UIF startup when using none backend
nightkr fb6da54
Rename GroupMembershipRequest to UserInfoRequest
nightkr f298e0b
Cache fetched UserInfo
nightkr b1644e4
Merge branch 'main' into spike/user-info-fetcher
nightkr 3d160ca
Switch UIF to also use workspace dependencies
nightkr a4f495d
Configurable UIF cache ttl
nightkr 57b45c7
UIF crate metadata
nightkr 20e585c
Move userInfo rule into helm chart
nightkr 05df3cb
Turn UIF custom attributes into a multidict
nightkr 2c511e4
UIF smoke test
nightkr 23a55c6
Remove rules from Helm chart until we have a better way to deploy them
nightkr 8c45dc1
Lint-b-gone
nightkr 0cdbfd3
Update CRD
nightkr fc7de76
UIF readme
nightkr 0a684d9
SNAFU error for UIF config
nightkr 3aceb68
Revert Cmd wrapper enum
nightkr 65934ee
docs
nightkr 3c60721
Prototype of new bundle builder
nightkr 1d48068
Include cm ns in bundle path
nightkr d6f939c
Merge commit spike/bundle-builder-v2-/uif-common-ancestor into spike/…
nightkr dcdf82e
Merge branch 'spike/bundle-builder-v2-/uif-merged' into spike/bundle-…
nightkr fae4196
Update bundle builder to Axum 0.7
nightkr 8908df5
Disable unused futures 0.1.x compat layer
nightkr a1618d5
Deploy bundle builder v2
nightkr b2a2c12
Fix bundle builder log collection
nightkr 0da032e
Avoid cloning bundle for status requests
nightkr 881950f
Handle and report errors
nightkr 4d7a156
Respect watch namespace
nightkr 20fc10c
Fix bundle builder Cargo metadata
nightkr 7ab1a67
Move dependencies into the workspace level
nightkr 21f77ed
Loosen dependency bounds for consistency
nightkr 12459bd
Formatting
nightkr 17173f9
Log bundled files
nightkr f8ec7fd
Log bundle invalidations
nightkr 2484b77
Ship userinfo rego module in bundle builder
nightkr 1c74f89
Fix userinfo/v1 syntax errors
nightkr 22ba466
Change userinfo documentation to refer to regolib
nightkr 7174021
Enable userinfofetcher docs in nav
nightkr dda07d2
Migrate tests to use regolib
nightkr 9150db1
Changelog
nightkr 5c99df0
Upgrade to operator-rs main and Kube-rs 0.92
nightkr a02b6a2
Switch bundle builder from multilog to tracing-appender
nightkr d801cf2
Log bundle builder output as JSON
nightkr ee4bfff
Merge branch 'main' into spike/bundle-builder-v2
nightkr a5fef33
Update operator-rs
nightkr 3cfc0c3
Regenerate Nix definitions
nightkr 7cd4db0
Update docs/modules/opa/pages/usage-guide/user-info-fetcher.adoc
nightkr a529195
Merge branch 'spike/bundle-builder-v2' into spike/userinfofetcher-reg…
nightkr 2182d4d
Changelog
nightkr 232fd64
Merge branch 'spike/bundle-builder-v2' into spike/userinfofetcher-reg…
nightkr bfbc941
Bump operator-rs
nightkr 6477db0
Merge branch 'main' into spike/bundle-builder-v2
nightkr bcadcc6
Update operator-rs
nightkr 6bfeb3a
Use released build of operator-rs
nightkr 3b81266
Remove dead bundle builder log bytes constant
nightkr f0b715d
Merge branch 'main' into spike/bundle-builder-v2
nightkr 412e713
Move bundle builder bugfix to unreleased
nightkr edbe052
Add comment about bundle builder log rotation
nightkr a13c44b
Merge branch 'spike/bundle-builder-v2' into spike/userinfofetcher-reg…
nightkr 0945763
Merge branch 'main' into spike/bundle-builder-v2
nightkr dfd64cb
Merge commit '0945763aa6a3edef7f3a20eab66fe191b27385b7' into spike/us…
nightkr 606be47
Consistency
nightkr b8a9b0a
Consistently mention the /admin group
nightkr 548422b
Update rust/regorule-library/src/userinfo/v1.rego
nightkr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[package] | ||
name = "stackable-opa-regorule-library" | ||
description = "Contains Stackable's library of common regorules" | ||
version.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
edition.workspace = true | ||
repository.workspace = true | ||
publish = false | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Stackable library of shared regorules | ||
|
||
This contains regorules that are shipped by the Stackable Data Platform (SDP) as libraries to help simplify writing authorization rules. | ||
|
||
## What this is not | ||
|
||
This library should *not* contain rules that only concern one SDP product. Those are the responsibility of their individual operators. | ||
nightkr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Versioning | ||
|
||
All regorules exposed by this library should be versioned, according to Kubernetes conventions. | ||
|
||
This version covers *breaking changes to the interface*, not the implementation. If a proposed change breaks existing clients, | ||
add a new version. Otherwise, change the latest version inline. | ||
|
||
Ideally, old versions should be implemented on top of newer versions, rather than carry independent implementations. | ||
NickLarsenNZ marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pub const REGORULES: &[(&str, &str)] = &[( | ||
"stackable/opa/userinfo/v1.rego", | ||
include_str!("userinfo/v1.rego"), | ||
)]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package stackable.opa.userinfo.v1 | ||
|
||
# Lookup by (human-readable) username | ||
userInfoByUsername(username) := http.send({ | ||
nightkr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"method": "POST", | ||
"url": "http://127.0.0.1:9476/user", | ||
"body": {"username": username}, | ||
"headers": {"Content-Type": "application/json"}, | ||
"raise_error": true | ||
sbernauer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}).body | ||
|
||
# Lookup by stable user identifier | ||
userInfoById(id) := http.send({ | ||
"method": "POST", | ||
"url": "http://127.0.0.1:9476/user", | ||
"body": {"id": id}, | ||
"headers": {"Content-Type": "application/json"}, | ||
"raise_error": true | ||
}).body |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.