-
Notifications
You must be signed in to change notification settings - Fork 68
feat: add gRPC mutual TLS support for the OAP channel #146
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
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Keep LF in paths this PR touches. CRLF in *.sh breaks Linux CI (`$'\r': command not found`). | ||
| *.sh text eol=lf | ||
| .github/workflows/*.yml text eol=lf | ||
| .github/workflows/*.yaml text eol=lf | ||
| .gitignore text eol=lf | ||
| .licenserc.yaml text eol=lf | ||
| .gitattributes text eol=lf | ||
| docs/**/*.md text eol=lf | ||
| tests/remote-e2e/mtls/** text eol=lf | ||
| *.crt -text | ||
| *.pem -text |
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
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
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,29 @@ | ||
| # Real OAP mTLS remote e2e | ||
|
|
||
| End-to-end coverage of Agent → OAP gRPC over mutual TLS against a real OAP + | ||
| BanyanDB stack (see `docker-compose.yml`). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Docker | ||
| - Node.js (same majors as CI: 20 / 22 / 24) | ||
| - `openssl` and `bash` (Git Bash or WSL on Windows) | ||
|
|
||
| ## Generate certificates | ||
|
|
||
| Private keys are not committed. Generate them before running the suite: | ||
|
|
||
| ```bash | ||
| bash tests/remote-e2e/mtls/generate-certs.sh | ||
| ``` | ||
|
|
||
| This writes `server/server.pem`, `client/client.pem`, and refreshes the CA / | ||
| leaf certificates under `server/` and `client/`. Those `.pem` files are gitignored. | ||
|
|
||
| ## Run | ||
|
|
||
| ```bash | ||
| npm run test tests/remote-e2e/mtls/ | ||
| ``` | ||
|
|
||
| CI runs the same `generate-certs.sh` step before the Jest suite. |
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,29 @@ | ||
| -----BEGIN CERTIFICATE----- | ||
| MIIE6DCCAtCgAwIBAgIUckh59cIFCT3jBextzlcwZ/bkrKswD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| LlRuGurXPH7pN3IPZo+AAxyzTbDIX9TU4IPOgfhL+k4OKBs0R5PmST7DBn/Q4Ile | ||
| 4c/EPuY3iDS+RrTebgDQ+zPrkeJ30SAK5wG/ZDNPqaBNxHaIepZnh0qb+65H10e7 | ||
| PuecuL8U0ZrpfhrXPodYgYPTM5tf8A7tEJKnx8AjKb4a0zoSq/0Wk9ScnNxi02Is | ||
| yvqwhTK7RZX/TlJlrIXTiDTFDT9RS4dmvSaWurrDM7qcUkFkqErnBX+3BREJ5m6g | ||
| pmGUdoRq+D9KWhnas5ATJB2sExzP/7J2JTA01/5KHBbg+k064DE/N70Cvh+10x0V | ||
| pSXJd4BgE7aRjB3BClGSvGLve+KKRSxU9I/6GHMmW2N9/t1IJau4QjqlnxggDqlu | ||
| r6VwCBVPuOUbR0K0pXdiILcFrGYg3OhYnjqti/IHPvSmmILzNIDknEsuTlw4lwlE | ||
| Oqhul9wh6EJH/JTCydMg/0twrn8CHTcNzX6VDpXb16F+d65HnOo5jeabAOjWVlCb | ||
| b42qOUsUqSckQs8Ag7aLnhhq7s99q19hZoC9BjS9dFEB2iPzq4wa/kO4gsVrLSBv | ||
| pAQMz3/DnLV/G81l2RnMotJi2s9S4t18uQTjsyPID5Uh0uT1rwGxDGhkCp7PhrsD | ||
| RXjsLdjVuANlkHYs | ||
| -----END CERTIFICATE----- |
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,30 @@ | ||
| -----BEGIN CERTIFICATE----- | ||
| MIIFGzCCAwOgAwIBAgIUZ8coAXTH7vRCPc1VeMw3MPvtGiQwDQYJKoZIhvcNAQEL | ||
| BQAwGjEYMBYGA1UEAwwPc3ctbXRscy10ZXN0LWNhMB4XDTI2MDkxNTA2NDczNVoX | ||
| DTM2MDkxMjA2NTIzNVowGDEWMBQGA1UEAwwNc3ctb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
| C/nKBFkhvNtP57+5btmOetWI0y36yTeuoc0ATHeW6aZihmDn6fsbVKwg6qJYB2Zm | ||
| 2InLsdFHZffj/sLqqhKeThNF7tyt92uSh6y8/mAbTyDaz/YItr/V9rUHRFvLQ46r | ||
| jSJxe3VbUuTFmh5/o5eURNewYTGz1YnFyNs33J8riG8eWaxyYCh3yw1vk4tj1nxC | ||
| kJhylAym8Qbka71sBU32ptq26wFKsohbzHoiY9oPr092CJ2Yql5O6j7qtTAo9s+4 | ||
| qvqqpcMQOC0jtA4DuYipy8JgW5/Hbx4WbQ/ybJL8EzEdJMwOrhjm3sFihXkT0o4q | ||
| B76mRs3KusnvXsJIyyYgmF6vlzgaTyKTWPXgr49VxCgsKEoZCdyTTCeOODfEorcR | ||
| MZb7TDL+NMHhxAJzQzD2MGrR7LfFAtN9ziq5bRub+WIbtUjEPr84Djr0Ah2HDYaA | ||
| uQkX8xWCx2xICfUbsXiFl3jUXVPqTvDFRXD2Tieiz4jYeg1w5TMapsevlFI7/9ci | ||
| y32gvZW4oTOvwSZ/v/mhZSWA/iGuJXEUVeaNM4eC5zwPCnsFJcPiAeJV5H1K9pG4 | ||
| L7k3VHYUnfo1SHh9kx7V | ||
| -----END CERTIFICATE----- |
Oops, something went wrong.
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.
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.
Minor logging issue (P3): these new calls use printf-style
%splaceholders, butcreateLogger()intentionally omitswinston.format.splat(), so the certificate paths and hostname override are not included in the messages.For example, with
SW_AGENT_LOGGING_LEVEL=debugandsslTargetNameOverride: 'example.test', I reproduced:The second message should say:
Could these calls use template strings or structured metadata? For example, the hostname message can be:
The credential-path message needs the same adjustment. This only affects troubleshooting output; TLS/mTLS behavior is unaffected.