Skip to content

AuthPolicy section targeting tests#702

Merged
azgabur merged 6 commits intoKuadrant:mainfrom
fabikova:section_name_targeting_tests
Sep 23, 2025
Merged

AuthPolicy section targeting tests#702
azgabur merged 6 commits intoKuadrant:mainfrom
fabikova:section_name_targeting_tests

Conversation

@fabikova
Copy link
Copy Markdown
Contributor

@fabikova fabikova commented Jul 8, 2025

Verifies that AuthPolicy applies only to specific HTTPRoute path (/get) when sectionName is set to api and CEL condition restricts application to that path. Unauthenticated access to /anything is allowed, while /get requires a valid token.

@fabikova fabikova marked this pull request as ready for review July 15, 2025 14:43
@fabikova fabikova force-pushed the section_name_targeting_tests branch 2 times, most recently from 344e8b7 to ab9febd Compare July 16, 2025 13:17
Copy link
Copy Markdown
Member

@azgabur azgabur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After few changes this test will nicely check for AuthPolicy targeting section name in HttpRoute. Next PR can add test for AuthPolicy targeting sec. name in Gateway. And next PR's for other Policies in same way

@fabikova fabikova force-pushed the section_name_targeting_tests branch 3 times, most recently from 22ce4e7 to 2ee518b Compare July 22, 2025 09:26
@fabikova fabikova requested a review from azgabur July 22, 2025 09:29
@fabikova fabikova force-pushed the section_name_targeting_tests branch from 2ee518b to b326c5d Compare July 22, 2025 09:46
fabikova added 2 commits July 22, 2025 11:48
Signed-off-by: Martina Fabikova <mfabikov@redhat.com>
The test creates a Gateway with two listeners (one secure, one public)
and two separate HTTPRoute resources to provide an unambiguous
configuration for the gateway controller.

It asserts that the policy only protects the targeted listener, while the
other listener remains public and unaffected.

Signed-off-by: Martina Fabikova <mfabikov@redhat.com>
@fabikova fabikova force-pushed the section_name_targeting_tests branch from b326c5d to 1ce25a2 Compare July 22, 2025 09:49
Copy link
Copy Markdown
Member

@azgabur azgabur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall nicely done

…hPolicy section targeting

Signed-off-by: Martina Fabikova <mfabikov@redhat.com>
@fabikova fabikova force-pushed the section_name_targeting_tests branch from 95f1301 to b2eb9e5 Compare July 24, 2025 09:43
@fabikova fabikova changed the title adds AuthPolicy Section Targeting Test using CEL predicate. AuthPolicy Section Targeting Test Jul 24, 2025
@fabikova fabikova changed the title AuthPolicy Section Targeting Test AuthPolicy section targeting tests Jul 24, 2025
Signed-off-by: Martina Fabikova <mfabikov@redhat.com>
@fabikova fabikova force-pushed the section_name_targeting_tests branch 2 times, most recently from 79e59c9 to bc7a2e0 Compare August 14, 2025 11:57
Copy link
Copy Markdown
Member

@azgabur azgabur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last review otherwise LGTM

…ther section name tests.

Signed-off-by: Martina Fabikova <mfabikov@redhat.com>
@fabikova fabikova force-pushed the section_name_targeting_tests branch from bc7a2e0 to 11fa839 Compare August 18, 2025 09:06
Signed-off-by: Martina Fabikova <mfabikov@redhat.com>
@averevki
Copy link
Copy Markdown
Contributor

/make kuadrant

@github-actions
Copy link
Copy Markdown

Test run has started (make kuadrant) and can be found here

@Kuadrant Kuadrant deleted a comment from github-actions Bot Sep 5, 2025
@averevki
Copy link
Copy Markdown
Contributor

averevki commented Sep 5, 2025

/make kuadrant

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 5, 2025

Test run has started (make kuadrant) and can be found here

@averevki
Copy link
Copy Markdown
Contributor

/make kuadrant

@github-actions
Copy link
Copy Markdown

Test run has started (make kuadrant) and can be found here

@azgabur azgabur merged commit 8fc102b into Kuadrant:main Sep 23, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants