I am trying to match and drop roles named as GUIDs, using:
transform user {
regex match role "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
action drop matched role
}
However, this conflicts with Caddy's use of placeholders, and the {4} are stripped out, meaning that this matching rule does not work as expected. The correct syntax to use here is:
regex match role "[0-9a-f]\\{8\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{12\\}"
I am trying to match and drop roles named as GUIDs, using:
However, this conflicts with Caddy's use of placeholders, and the
{4}
are stripped out, meaning that this matching rule does not work as expected. The correct syntax to use here is:Please can this be noted in the documentation to help other users avoid the same pitfall: https://github.com/authcrunch/authcrunch.github.io/blob/c6d02968980595021863c223369f9f6cb31992b6/docs/authenticate/42-user-transforms.md?plain=1#L148-L160