Skip to content

[discourse] Read Only Static Token? #4337

Answered by markphelps
markphelps asked this question in Q&A
Discussion options

You must be logged in to vote

Reply from george on Discourse:

Hey @n2p5 !

There are few ways to slice and dice this.

W.r.t to exposing flags to the frontend, you can actually exclude the evaluation API from authentication altogether. It is a bit of a blunt instrument, so not for everyone. But there is space in the configuration to exclude parts of the API if you so wish.

However, as you mentioned, you can also define a rego policy that grants this scope to certain API tokens. A simple policy might look something like:

package flipt.authz.v1

import rego.v1

default allow := false

allow if {
  input.authentication.method == "METHOD_TOKEN"
  input.authentication.metadata["io.flipt.auth.token.name"] == "read-only"
  inp…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

markphelps
Jun 9, 2025
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by markphelps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant