-
Notifications
You must be signed in to change notification settings - Fork 124
support ext_authz v3 API, still serve v2 #217
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
Merged
Merged
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,3 +13,8 @@ site.tar.gz | |
|
|
||
| # runtime artifacts | ||
| policies | ||
|
|
||
| # cert files | ||
| opa-envoy.crt | ||
| opa-envoy.key | ||
| root.crt | ||
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,45 @@ | ||
| #!/usr/bin/env bash | ||
| # This script is used to generate TLS certs that can be used with opa-envoy-plugin built | ||
| # with Go 1.15+. (That version of Go declines CN=<domain name> for server identification, | ||
| # but requires proper SNI settings, using subjectAltName (SAN). | ||
| # | ||
| # After running the script, the output of `base64 opa-envoy.crt` and `base64 opa-envoy.key` | ||
| # need to be pasted into examples/istio/quick_start.yaml: | ||
| # - The cert and key goes into tls.crt and tls.key of the server-cert Secret, | ||
| # - The cert also goes into clientConfig.caBundle of the webhook 'opa-istio-admission-controller'. | ||
|
|
||
| cat > v3.txt <<- EOF | ||
tsandall marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| keyUsage = critical, digitalSignature, keyEncipherment, dataEncipherment, keyAgreement | ||
| extendedKeyUsage = serverAuth | ||
| subjectKeyIdentifier=hash | ||
| authorityKeyIdentifier=keyid,issuer | ||
| subjectAltName = DNS:admission-controller.opa-istio.svc | ||
| EOF | ||
|
|
||
| openssl req -x509 \ | ||
| -subj "/CN=OPA Envoy plugin" \ | ||
| -nodes \ | ||
| -newkey rsa:4096 \ | ||
| -days 1826 \ | ||
| -keyout root.key \ | ||
| -out root.crt | ||
| openssl genrsa -out opa-envoy.key 4096 | ||
| openssl req -new \ | ||
| -key opa-envoy.key \ | ||
| -subj "/CN=opa-envoy" \ | ||
| -reqexts SAN \ | ||
| -config <(cat /etc/ssl/openssl.cnf \ | ||
| <(printf "\n[SAN]\nsubjectAltName=DNS:admissin-controller.opa-istio.svc")) \ | ||
| -sha256 \ | ||
| -out opa-envoy.csr | ||
| openssl x509 -req \ | ||
| -extfile v3.txt \ | ||
| -CA root.crt \ | ||
| -CAkey root.key \ | ||
| -CAcreateserial \ | ||
| -days 1825 \ | ||
| -sha256 \ | ||
| -in opa-envoy.csr \ | ||
| -out opa-envoy.crt | ||
|
|
||
| rm v3.txt opa-envoy.csr root.key root.srl | ||
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.