You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.
The tag feature of Keycloak Gatekeeper [outlined here|https://www.keycloak.org/docs/latest/securing_apps/#custom-pages], is not ingested by the CLI parameter "--tags".
What is the result?
When presenting a custom 403 html page, the tags are not able to be set via CLI parameters referencing environment variables and are only available to be referenced from a config.yaml file from the "tags" property.
What is the error output?
When attempting to use the "--tag" flag, receive the following error message due to referencing a misnamed command line flag "[error] invalid options, flag provided but not defined: -tag"
Generated from [https://github.com/keycloak/keycloak-gatekeeper/blob/1b7ee69ed9ef1b471be86a18b37db82bc950a4f6/cli.go#L45|https://github.com/keycloak/keycloak-gatekeeper/blob/1b7ee69ed9ef1b471be86a18b37db82bc950a4f6/cli.go#L45]
Code references, diagnosis:
The doc.go file [https://github.com/keycloak/keycloak-gatekeeper/blob/9c5c77dad799f5c4cf78e0a0650f327819e9190c/doc.go#L355|https://github.com/keycloak/keycloak-gatekeeper/blob/9c5c77dad799f5c4cf78e0a0650f327819e9190c/doc.go#L355] on line 355 references the Config "Tags" property definition as "yaml:"tags"".
The cli.go file builds the command line options based on the property definition [https://github.com/keycloak/keycloak-gatekeeper/blob/1b7ee69ed9ef1b471be86a18b37db82bc950a4f6/cli.go#L107|https://github.com/keycloak/keycloak-gatekeeper/blob/1b7ee69ed9ef1b471be86a18b37db82bc950a4f6/cli.go#L107]
The cli.go file when ingesting key value pair flags, references "tag" instead of "tags" when parsing and merging the command line flags with the config file definitions [https://github.com/keycloak/keycloak-gatekeeper/blob/1b7ee69ed9ef1b471be86a18b37db82bc950a4f6/cli.go#L193|https://github.com/keycloak/keycloak-gatekeeper/blob/1b7ee69ed9ef1b471be86a18b37db82bc950a4f6/cli.go#L193]
Potential fix:
Provided the above diagnosis is correct, updating "tag" to "tags", linked above, in the cli.go file will result in the ability to utilize tags from the CLI flags.
What:
What is the problem?
What is the result?
What is the error output?
Code references, diagnosis:
Potential fix:
Reference:
The text was updated successfully, but these errors were encountered: