Skip to content
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

Docs: Update security policy docs with usergroup and wildcard examples #5210

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

begelundmuller
Copy link
Contributor

No description provided.

@begelundmuller begelundmuller self-assigned this Jul 8, 2024
Copy link
Contributor

@AndrewRTsao AndrewRTsao left a comment

Choose a reason for hiding this comment

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

Made a 2nd commit with the proposed cleanup and adding an example for showing access, which should be the most common use case for groups with security policies. @begelundmuller Could you validate quickly and then I'll approve?

@@ -40,8 +40,7 @@ When developing access policies, you can leverage a fixed set of user attributes
- `.user.domain` – the domain of the current user's email address, for example `example.com` (string)
- `.user.name` - the current user's name, for example `John Doe` (string)
- `.user.admin` – a boolean value indicating whether the current user is an org or project admin, for example `true` (bool)
<!-- PENDING SUPPORT FOR USER-DEFINED USERGROUPS -->
<!-- - `.user.groups` - a list of usergroups the user belongs to in the project's org. Custom usergroups are not currently supported, so this will always be `["all"]`. -->
- `.user.groups` - a list of usergroups the user belongs to in the project's org (list of strings)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we change this to "user groups". I would probably give an example as well:

.user.groups - a list of user groups the user belongs to in the project's org (list of strings), e.g. ["marketing", "sales", "finance"]

<!--
### Use wildcards to select all dimensions and measures

When building field include policies, you can easily select all fields using `names: '*'`. For example:
Copy link
Contributor

Choose a reason for hiding this comment

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

I would change this to "When defining inclusion or exclusion policies, you can easily automatically select all columns by using names: '*" as a wildcard. For example:"

names: '*'
```

Note that the `'*'` must be quoted (using single or double quotes), and must be provided as a scalar value, not as an entry in a list.
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably bold: must be provided as a scalar value

### Filter queries based on the user's groups

Let's say additionally we want to filter queries based on user's groups and there exist a `group` dimension in the model:
You can inject the groups that a user belongs to into row filter:
Copy link
Contributor

Choose a reason for hiding this comment

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

I would probably change this to: "You can directly inject the groups that a user belongs to into the row filter itself, such as:"

@AndrewRTsao AndrewRTsao self-requested a review July 9, 2024 12:22
@AndrewRTsao AndrewRTsao merged commit 623db9a into main Jul 9, 2024
2 checks passed
@AndrewRTsao AndrewRTsao deleted the begelundmuller/docs-access-wildcards-groups branch July 9, 2024 12:23
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