Repository navigation
support route exposure for Central endpoint #331
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
Open
davdhacs
wants to merge
6
commits into
main
Choose a base branch
from
add-route-exposure
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
db4b0de
support route exposure for Central endpoint
davdhacs ebdddaf
wait for route admission and honor cancellation
davdhacs fdf9064
read admission from route ingress status
davdhacs b65ff3e
list route in the exposure flag help
davdhacs 10005a8
Merge branch 'main' into add-route-exposure
davdhacs c4d2fb9
fetch route once and flatten the admission wait
davdhacs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| package deployer | ||
|
|
||
| import ( | ||
| "encoding/json" | ||
| "testing" | ||
| ) | ||
|
|
||
| func TestRouteStatusParse(t *testing.T) { | ||
| raw := `{"spec":{"host":"central-acs-central.apps-crc.testing"}, | ||
| "status":{"ingress":[{"host":"central-acs-central.apps-crc.testing", | ||
| "conditions":[{"type":"Admitted","status":"True","lastTransitionTime":"x"}]}]}}` | ||
| var r routeStatus | ||
| if err := json.Unmarshal([]byte(raw), &r); err != nil { | ||
| t.Fatal(err) | ||
| } | ||
| if r.Spec.Host != "central-acs-central.apps-crc.testing" { | ||
| t.Fatalf("host: %q", r.Spec.Host) | ||
| } | ||
| host, admitted := routeAdmittedFor(r) | ||
| if !admitted || host != r.Spec.Host { | ||
| t.Fatalf("admitted=%v host=%q", admitted, host) | ||
| } | ||
| // unadmitted / host-mismatch variants | ||
| raw2 := `{"spec":{"host":"h1"},"status":{"ingress":[{"host":"h2","conditions":[{"type":"Admitted","status":"True"}]}]}}` | ||
| json.Unmarshal([]byte(raw2), &r) | ||
| if _, admitted := routeAdmittedFor(r); admitted { | ||
| t.Fatal("host mismatch must not be admitted") | ||
| } | ||
| raw3 := `{"spec":{"host":"h1"},"status":{"ingress":[{"host":"h1","conditions":[{"type":"Admitted","status":"False"}]}]}}` | ||
| json.Unmarshal([]byte(raw3), &r) | ||
| if _, admitted := routeAdmittedFor(r); admitted { | ||
| t.Fatal("Admitted=False must not be admitted") | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: stackrox/roxie
Length of output: 2666
Script executed:
Repository: stackrox/roxie
Length of output: 15094
Script executed:
Repository: stackrox/roxie
Length of output: 21101
Script executed:
Repository: stackrox/roxie
Length of output: 19327
Web query:
OpenShift Route TLS reencrypt frontend router certificate certificate field official documentationResult:
Web query:
site:docs.redhat.com Red Hat Advanced Cluster Security Central "reencrypt" "route" enabled default exposureResult:
Trust and validate the certificate for reencrypt Routes.
central.exposure: routeuses passthrough by default. If acentral.specoverlay enablescentral.exposure.route.reencrypt.enabled, the Route can serve a certificate outside the trust pool loaded from Central's CA and optionaldefaultTLSSecret. CRS generation can fail when that certificate chain is not in the pool. Include the Route certificate chain in trust and validate it against the Route hostname.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed that is a heavy-lift. I think it is beyond the scope of this PR, and not necessary for the CI use of routes without re-encrypt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davdhacs Agreed. This concern applies to re-encrypt Routes, not the passthrough Routes used by your CI workflow. Re-encrypt certificate trust can remain outside this PR’s scope.
Would you like me to open a follow-up GitHub issue for re-encrypt Route support?
You are interacting with an AI system.