Skip to content

Add istio meshConfig, internal auth gateway and token-vendor auth httproutes#687

Merged
ensonic merged 4 commits into
mainfrom
awhdesmond/istio-auth-url
May 20, 2026
Merged

Add istio meshConfig, internal auth gateway and token-vendor auth httproutes#687
ensonic merged 4 commits into
mainfrom
awhdesmond/istio-auth-url

Conversation

@awhdesmond
Copy link
Copy Markdown
Contributor

@awhdesmond awhdesmond commented May 20, 2026

  1. Configure extension providers in Istio's mesh_config to use crc-auth-gateway
  2. Deploy crc-auth-gateway using Gateway API Gateway resource, but only give it an internal clusterIP.
  3. Apply AuthorizationPolicy on crc-gateway to use crc-auth-gateway extension provider for external HTTP authorization.
  4. Add auth HTTPRoute for public-key-access-auth and public-key-access-auth, targetting crc-auth-gateway
  5. Include an explicity-allow catch-all route for crc-auth-gateway as not all paths require authz. (It can be switched to explicit-deny)

Comment thread src/app_charts/base/cloud/istio.yaml Outdated
spec:
containers:
- name: nginx
image: nginxinc/nginx-unprivileged:alpine
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will we be allowed to use open-source (Apache 2 license) NGINX image here for CRC?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not authoritative, but CRC itself is apache-2.0 so I would assume yes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i have updated to use nginxinc/nginx-unprivileged:1.30.1-alpine

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, the license is fine. We can also consider a simple go-lang server if all it needs to do is to reply with OK 200. But that can be a followup.

@awhdesmond awhdesmond requested review from ensonic, koonpeng and liyin00 and removed request for koonpeng and liyin00 May 20, 2026 06:49
apiVersion: apps/v1
kind: Deployment
metadata:
name: explicit-allow-svc
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's may be worth to refactor this service out to its own file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, it appears to be only for testing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This service is used as the catch-all service with pathprefix / under the auth gateway. I would assume not all paths require authz, so this catch-all service will respond with HTTP 200 for all those services.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, we need to support routes that don't require auth.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we try this:

filters:
    - type: RequestRedirect
      requestRedirect:
        statusCode: 200

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will result in:

The HTTPRoute "crc-auth-catchall" is invalid: 
* spec.rules[0].filters[0].requestRedirect.statusCode: Unsupported value: 200: supported values: "301", "302"
* <nil>: Invalid value: null: some validation rules were not checked because the object was invalid; correct the existing errors to complete validation

@awhdesmond awhdesmond requested a review from koonpeng May 20, 2026 07:25
Copy link
Copy Markdown
Contributor

@ensonic ensonic left a comment

Choose a reason for hiding this comment

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

Awesome, lets iterate in followups to finetune it.

@ensonic ensonic merged commit e0791a1 into main May 20, 2026
7 checks passed
@ensonic ensonic deleted the awhdesmond/istio-auth-url branch May 20, 2026 11:53
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