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

How to blow up in access_policy if security_context does not have specified member? #9048

Open
mzealey opened this issue Dec 16, 2024 · 1 comment
Assignees
Labels
question The issue is a question. Please use Stack Overflow for questions.

Comments

@mzealey
Copy link

mzealey commented Dec 16, 2024

I'm building an access_policy approach as per:

filters:
- member: "{CUBE}.city"
operator: equals
values: ["{ security_context.auth.userAttributes.city }"]

It's a great feature and will massively simplify our config because different tables have different RBAC from the token. However (and I'd imagine it's quite a common case - hence raising it here), we need to blow up if the given security_context does not have the specified attribute. If it's a nested attribute then this will blow up correctly (as dereferencing an undefined object), however if it's just security_context.xxx it will interpolate as undefined.

@igorlukanin igorlukanin self-assigned this Dec 16, 2024
@igorlukanin igorlukanin added the question The issue is a question. Please use Stack Overflow for questions. label Dec 16, 2024
@mzealey
Copy link
Author

mzealey commented Dec 16, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue is a question. Please use Stack Overflow for questions.
Projects
None yet
Development

No branches or pull requests

2 participants