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

Clarify "Regex Priority Order" setting behavior #1475

Open
kenjenkins opened this issue Jun 25, 2024 · 2 comments
Open

Clarify "Regex Priority Order" setting behavior #1475

kenjenkins opened this issue Jun 25, 2024 · 2 comments

Comments

@kenjenkins
Copy link
Contributor

Page: https://www.pomerium.com/docs/reference/routes/regex-priority-Order

What's incorrect or missing

This reference page shows a 'Core' example under 'How to Configure'. However, this setting applies only to routes defined in the Enterprise Console.

What's the resolution?

Let's clarify that this setting is only for the Enterprise Console, and that routes defined in a YAML config file are matched in the order they are listed.

Let's also clarify which way the priority goes — does higher priority go to the higher numerical value or the lower numerical value?

@ZPain8464
Copy link
Contributor

@kenjenkins thanks for submitting this. I wasn't aware this was an Enterprise-only setting. I'll add this to ready.

The resolution steps make sense, but I have a question: Wouldn't most Enterprise users define these routes in the Console itself? I understand that there could be a use case where a user would define these routes in a YAML file, too. But again, wouldn't they import their routes to the Console?

@kenjenkins
Copy link
Contributor Author

Wouldn't most Enterprise users define these routes in the Console itself?

If I understand correctly, this setting is a way to define a matching order for routes defined in the Enterprise Console, in case you have multiple routes with regex path matching that might overlap.

A contrived example might be one route matching /foo/.* and another route matching /.*/bar. If you make a request for /foo/bar, which route should it match?

For an open-source Pomerium configuration, it matches whichever route appears first in the config file.

But for Enterprise Console, we don't have a defined ordering between routes. The "Regex Priority Order" setting lets Enterprise users define which route should take precedence in the case of overlaps like this. I think higher number priority takes precedence, but we should double check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants