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

Provide more data from service configuration #343

Open
fredmaggiowski opened this issue May 6, 2024 · 0 comments
Open

Provide more data from service configuration #343

fredmaggiowski opened this issue May 6, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@fredmaggiowski
Copy link
Member

Is your feature request related to a problem? Please describe

I'd like to be able to provide more additional input data to my policies.

This feature may be used for several use cases, such as:

  • provide some certificate/key for payload encryption/signing
  • provide custom datasets/variables to my policies to avoid hardcoding

and more.

Describe the solution you'd like

I'd like to be able to run my policies and use the data keyword to access my contents.

e.g. Using PEM encoded certificates

allow_after_token_verified {
    mytoken := input.request.headers["My-Token"]
    pem_certificate := data.MY_PEM_CERTIFICATE
    io.jwt.verify_es256(mytoken, pem_certificate)
}

This may work with data supplied both by configuration file and environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant