Ryan Richard
56bf9bad25
GitHubIdentityProvider: document github.com vs. api.github.com
...
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com >
2024-08-06 08:58:30 -07:00
Ryan Richard
229b6a262e
when dialing github to test connection, dial api.github.com
...
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com >
2024-08-06 08:58:30 -07:00
Ryan Richard
74d9fb863f
Merge pull request #2028 from vmware-tanzu/doc_typo
...
fix WS1 doc typo
2024-08-06 08:58:00 -07:00
Joshua Casey
e332fb505c
Merge branch 'main' into doc_typo
2024-08-06 09:10:21 -05:00
Ashish Amarnath
dafde586ec
Merge pull request #2033 from vmware-tanzu/update-comments
...
fix typo in integration test function comments
2024-08-06 06:50:44 -07:00
Joshua Casey
cb101e4dbe
Merge branch 'main' into doc_typo
2024-08-06 08:28:22 -05:00
Ashish Amarnath
6fdfee36fe
fix typo in integration test function comments
...
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 23:33:31 -07:00
Ryan Richard
0787301ddb
Merge pull request #1996 from ashish-amarnath/ca-bundles-ref
...
Implement proposal to allow Pinniped custom resources to ref configmaps or secrets for CA bundles
2024-08-05 14:28:39 -07:00
Ryan Richard
2af510a3ee
Revert "add integration test for TLS config validation in GitHubIdentityProvider"
...
This reverts commit 23129da3e2 .
2024-08-05 12:52:41 -07:00
Ryan Richard
fdeca2c026
Revert "add integration test for TLS config validation in OIDCIdentityProvider"
...
This reverts commit 59402bca7b .
2024-08-05 12:52:29 -07:00
Ryan Richard
23fd15f840
Revert "Add integration tests for tls spec validation in JWTAuthenticator and WebhookAuthenticator"
...
This reverts commit c3405095b2 .
2024-08-05 12:52:21 -07:00
Ryan Richard
06b7d302a2
fix typo in tmpl and run codegen
2024-08-05 11:32:21 -07:00
Ashish Amarnath
b70db9dc03
refactor to use new certificateAuthorityDataSourceKind enum
...
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:21 -07:00
Ryan Richard
d4ac69d88e
run codegen for changes in previous commit
2024-08-05 11:32:21 -07:00
Ryan Richard
59c2295dfd
improve api docs for TLSSpec in authenticator and IDP specs
...
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:21 -07:00
Ryan Richard
4eb9a09385
test more condition message cases in concierge_tls_spec_test.go and supervisor_tls_spec_test.go
2024-08-05 11:32:21 -07:00
Ryan Richard
db2d7c8c50
assert on condition message in concierge_tls_spec_test.go and supervisor_tls_spec_test.go
2024-08-05 11:32:21 -07:00
Ryan Richard
2ebf9d3d00
minor test refactor
2024-08-05 11:32:21 -07:00
Ryan Richard
67de14a3b8
ran codegen on previous commit's changes
2024-08-05 11:32:21 -07:00
Ryan Richard
a40c88ebf3
document allowed enum values and default values in all CR spec fields
2024-08-05 11:32:21 -07:00
Ashish Amarnath
23129da3e2
add integration test for TLS config validation in GitHubIdentityProvider
...
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:21 -07:00
Ashish Amarnath
59402bca7b
add integration test for TLS config validation in OIDCIdentityProvider
...
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:21 -07:00
Ashish Amarnath
c3405095b2
Add integration tests for tls spec validation in JWTAuthenticator and WebhookAuthenticator
...
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:21 -07:00
Ryan Richard
2181418cc5
refactor test helpers in supervisor_login_test.go
...
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:21 -07:00
Ryan Richard
e0235ed190
update docs and change struct name in types_tls.go.tmpl files
...
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:21 -07:00
Ryan Richard
02e41baa47
small refactors
2024-08-05 11:32:21 -07:00
Ryan Richard
91ef68992c
document new CA bundle source option in howto docs
2024-08-05 11:32:20 -07:00
Ashish Amarnath
43964ff7a2
update generated api docs
...
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:20 -07:00
Ashish Amarnath
19c4acf391
secret/configmap with CA bundle to be created in namespace where pinniped is installed
...
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:20 -07:00
Ryan Richard
ed502949dd
webhookcachefiller and jwtcachefiller always update status when needed
...
Even when the authenticator is found in the cache, try to update its
status. Failing to do so would mean that the actual status will not
be overwritten by the controller's newly computed desired status.
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:20 -07:00
Ashish Amarnath
a0c259ffbc
update expectation conditions message when CA bundle is not configured
...
fix a typo where we intended to use a configmap instead of a secret
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
Co-authored-by: Ryan Richard <richardry@vmware.com >
2024-08-05 11:32:20 -07:00
Joshua Casey
d6d66faae3
jwtcachefiller now tests for exact log lines and prints when it chooses to not update the status
2024-08-05 11:32:20 -07:00
Ryan Richard
15c84fcc94
extract helper func in jwtcachefiller and webhookcachefiller
2024-08-05 11:32:20 -07:00
Joshua Casey
1438f06c12
webhookcachefiller adds more detail when it chooses to update or not update status conditions
2024-08-05 11:32:20 -07:00
Joshua Casey
ca5bb2170c
webhookcontroller should use a logger that is built for each webhook authenticator
2024-08-05 11:32:20 -07:00
Joshua Casey
05a2fd97f8
webhookcontroller now only logs the webhook authenticator name instead of an object
...
Co-authored-by: Ryan Richard <richardry@vmware.com >
2024-08-05 11:32:20 -07:00
Joshua Casey
dedd51df91
Test Refactor: webhookauthenticator_test checks exact log line equality
...
Co-authored-by: Ryan Richard <richardry@vmware.com >
2024-08-05 11:32:20 -07:00
Ryan Richard
290676e4d1
improve info/debug log messages for jwtcachefiller & webhookcachefiller
...
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:20 -07:00
Ryan Richard
8725ab4caa
do not make any assumption about OIDC issuer 404 page body in test
...
Instead of using Dex or Okta, use a fake localhost issuer which
does not exist. This will give a consistent connection error
message. Needed because Dex and Okta return different 404 error
pages, so we can't easily make a test assertion that works for both.
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:20 -07:00
Ryan Richard
3891f90f43
skip external CA bundle tests when CA bundle is empty
...
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:20 -07:00
Ryan Richard
9f17ba5ae4
change wording of TLS config loaded success messages
2024-08-05 11:32:20 -07:00
Ashish Amarnath
81d42cb3b9
add unit tests for validatedsettings cache storing ca bundle hash
...
Signed-off-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
Co-authored-by: Ryan Richard <richardry@vmware.com >
2024-08-05 11:32:20 -07:00
Ryan Richard
dfef9f470f
fix bug in webhookcachefiller caused when status update returns error
...
Also refactor test assertions regarding log statements in
jwtcachefiller_test.go and webhookcachefiller_test.go
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:20 -07:00
Ryan Richard
f5da417450
fix bug in jwtcachefiller caused when status update returns error
...
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:20 -07:00
Joshua Casey
a888083c50
Introduce type alias CABundleHash for the hash of a CA bundle ([32]byte)
...
Co-authored-by: Ryan Richard <richardry@vmware.com >
Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com >
2024-08-05 11:32:20 -07:00
Joshua Casey
99cfc4fbce
Remove tlsconfigutil.CABundle.IsEqual and ensure that tlsconfigutil.NewCABundle handles nil/empty input
...
Co-authored-by: Ryan Richard <richardry@vmware.com >
2024-08-05 11:32:20 -07:00
Joshua Casey
fcceeed9fa
Refactor tlsconfigutil.CABundle 'getters' to not have 'get' in the name
...
Co-authored-by: Ryan Richard <richardry@vmware.com >
2024-08-05 11:32:20 -07:00
Joshua Casey
4cf0e46c38
tlsconfigutil.CABundle should generate its own certPool
2024-08-05 11:32:20 -07:00
Joshua Casey
34eff2a2f9
Refactor tlsconfigutil.buildCABundle to make it more clear where the bundle is coming from
2024-08-05 11:32:20 -07:00
Joshua Casey
e82cb2c7ba
Refactor tlsconfigutil.getCertPool to return a CABundle and change its name to buildCABundle
2024-08-05 11:32:20 -07:00