-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): dev selectors employ flattening from platform instead of jq (
- Loading branch information
1 parent
2ffd3c7
commit 57966ff
Showing
10 changed files
with
138 additions
and
261 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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,45 @@ | ||
--- | ||
title: Generate a set of selector expressions for keys and values of a Subject Context | ||
command: | ||
name: generate | ||
aliases: | ||
- gen | ||
flags: | ||
- name: subject | ||
shorthand: s | ||
description: A Subject Context string (JSON or JWT, default JSON) | ||
default: '' | ||
--- | ||
|
||
Take in an Entity Representation as a JWT or JSON object, such as that provided by | ||
an Identity Provider (idP), LDAP, or OIDC Access Token JWT, and generate | ||
sample selectors employing [flattening syntax](#flattening-syntax) to utilize within | ||
within Subject Condition Sets that resolve an external Subject Context into mapped Attribute | ||
Values. | ||
|
||
# Flattening-syntax | ||
|
||
The platform maintains a very simple flattening library such that the below structure flattens into the key/value pairs beneath. | ||
|
||
Subject input (`--subject`): | ||
|
||
```json | ||
{ | ||
"key": "abc", | ||
"something": { | ||
"nested": "nested_value", | ||
"list": ["item_1", "item_2"] | ||
} | ||
} | ||
``` | ||
|
||
Generated Selectors: | ||
|
||
| Selector | Value | Significance | | ||
| -------------------- | -------------- | ------------------------- | | ||
| ".key" | "abc" | specified field | | ||
| ".something.nested" | "nested_value" | nested field | | ||
| ".something.list[0]" | "item_1" | first index specifically | | ||
| ".something.list[]" | "item_1" | any index in the list | | ||
| ".something.list[1]" | "item_2" | second index specifically | | ||
| ".something.list[]" | "item_2" | any index in the list | |
This file contains 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 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 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.