Skip to content
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

[Audit Logging] End2end test for audit logging in authorization policy #33196

Merged
merged 19 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/tsi/test_creds/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ exports_files([
"server0.pem",
"client.key",
"client.pem",
"client3.key",
"client3.pem",
"client-with-spiffe.key",
"client-with-spiffe.pem",
"badserver.key",
"badserver.pem",
"badclient.key",
Expand Down
16 changes: 6 additions & 10 deletions src/core/tsi/test_creds/README
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,14 @@ common name which is set to testclient2.
$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client2.csr \
-out client2.pem -days 3650

client3 is issued by CA:
client-with-spiffe is issued by CA:
-----------------------

$ openssl genrsa -out client3.key.rsa 2048
$ openssl pkcs8 -topk8 -in client3.key.rsa -out client3.key -nocrypt
$ openssl req -new -key client3.key -out client3.csr -config client3-openssl.cnf

When prompted for certificate information, everything is default except the
common name which is set to testclient3.

$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client3.csr \
-out client3.pem -extensions v3_req -extfile client3-openssl.cnf -days 3650
$ openssl genrsa -out client-with-spiffe.key.rsa 2048
$ openssl pkcs8 -topk8 -in client-with-spiffe.key.rsa -out client-with-spiffe.key -nocrypt
$ openssl req -new -key client-with-spiffe.key -out client-with-spiffe.csr -config client-with-spiffe-openssl.cnf
$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client-with-spiffe.csr \
-out client-with-spiffe.pem -extensions v3_req -extfile client-with-spiffe-openssl.cnf -days 3650

server0 is issued by CA:
------------------------
Expand Down
4 changes: 2 additions & 2 deletions test/cpp/end2end/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -943,8 +943,8 @@ grpc_cc_test(
srcs = ["grpc_authz_end2end_test.cc"],
data = [
"//src/core/tsi/test_creds:ca.pem",
"//src/core/tsi/test_creds:client3.key",
"//src/core/tsi/test_creds:client3.pem",
"//src/core/tsi/test_creds:client-with-spiffe.key",
"//src/core/tsi/test_creds:client-with-spiffe.pem",
"//src/core/tsi/test_creds:server1.key",
"//src/core/tsi/test_creds:server1.pem",
],
Expand Down