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

Add some mechanism to use XACML Variables in XPath expressions #30

Open
cdanger opened this issue Jun 21, 2024 · 2 comments
Open

Add some mechanism to use XACML Variables in XPath expressions #30

cdanger opened this issue Jun 21, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@cdanger
Copy link

cdanger commented Jun 21, 2024

This would allow to use XACML variables as inputs to any XPath function / expression, which would provider simpler alternatives to certain complex ApplyExpressions.

For example, say we declare a variable classif_name:

<VariableDefinition VariableId="classif_name>...</VariableDefinition>

Then we want to use it in a XPath expression as follows:

<AttributeSelector Path="if ($classif_name = 'SECRET') then 3 else if ($classif_name = 'CONFIDENTIAL') then 2 else if ($classif_name = 'RESTRICTED ') then 1 else 0" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="true" />

The idea is to use the same variable ID in the XPath expression as the VariableDefinition.

@steven-legg
Copy link

steven-legg commented Jun 21, 2024

Can we simply say that all the variables in scope of the attribute selector with names that are valid for XPath variable names, and have a compatible data-type, are available to reference in the XPath expression?

@cdanger
Copy link
Author

cdanger commented Jun 21, 2024

Yeah, we can say that.

@cdanger cdanger self-assigned this Jul 9, 2024
@cdanger cdanger added the enhancement New feature or request label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants