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

Define authn policy enforcement test and add test certs and policy #1929

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

danielywong
Copy link

No description provided.

@danielywong danielywong requested review from a team as code owners July 21, 2023 18:06
@OpenConfigBot
Copy link

OpenConfigBot commented Jul 21, 2023

Pull Request Functional Test Report for #1929 / db8edfb

No tests identified for validation.

Help

@danielywong
Copy link
Author

danielywong commented Jul 21, 2023

@xw-g
@tomek-US
@morrowc
PTAL and add approvers. I have very limited access to this group.

feature/security/gnsi/certz/tests/README.md Outdated Show resolved Hide resolved
feature/security/gnsi/certz/tests/README.md Show resolved Hide resolved
@morrowc morrowc requested a review from bensons July 22, 2023 01:44
@morrowc
Copy link
Contributor

morrowc commented Jul 22, 2023

secret trick, benson is an approver here.

Copy link
Collaborator

@xw-g xw-g left a comment

Choose a reason for hiding this comment

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

btw, @morrowc is going to merge #1563, since your test is focusing on the authentication policy, can you help name your folder tests -> something like "authentication_policy"? Thanks.

* `testdata/leaf_key.pem`: private key for `leaf_cert.pem`
* `testdata/root_cert.pem`: trust bundle
* `testdata/policy_1.pb`: authentication policy that client certificates are tested against
* `loas3_disable_realm_consistency_check`: Server flag set according to [Tests](#tests) below.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: remove internal terminology loas3?

## Authentication Policy Enforcement

Test device enforcement of
[`gnsi.certz.v1.AuthenticationPolicy`](https://github.com/openconfig/gnsi/blob/main/certz/certz.proto)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@danielywong can you help provide a link to the doc/spec about the schema of the policy? Thanks.

* `testdata/leaf_key.pem`: private key for `leaf_cert.pem`
* `testdata/bad_leaf_cert_1.pem`: client certificate issued by unauthorized issuer
* `testdata/bad_leaf_key_1.pem`: private key for `bad_leaf_cert_1.pem`
* `testdata/bad_leaf_cert_2.pem`: client certificate containing inconsistent trust domains
Copy link
Collaborator

Choose a reason for hiding this comment

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

@danielywong Sorry, what is the definition of "trust domains" here? (e.g. which certificate attributes we are comparing?)

* `testdata/bad_leaf_key_1.pem`: private key for `bad_leaf_cert_1.pem`
* `testdata/bad_leaf_cert_2.pem`: client certificate containing inconsistent trust domains
* `testdata/bad_leaf_key_2.pem`: private key for `bad_leaf_cert_2.pem`
* `testdata/bad_leaf_cert_3.pem`: client certificate containing inconsistent realm
Copy link
Collaborator

Choose a reason for hiding this comment

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

@danielywong, regarding "inconsistent realm", can you help clarify what exact cert attributes are comparing? Thanks.

All DUT services should also be configured with Authorization Policy that will grant
access to the clients' identities as minted in their certificates.

### Tests {#tests}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Certz-6.1 (#1563 defined Certz-1.x ----> Certz 5.x)

@morrowc
Copy link
Contributor

morrowc commented Jan 23, 2024

this got lost maybe?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@danielywong can you help merge with existing feature.textproto file? Thanks. (only a few lines additions, should be straightforward).

Copy link
Collaborator

@xw-g xw-g Jan 31, 2024

Choose a reason for hiding this comment

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

@danielywong here is the existing file structure, https://github.com/openconfig/featureprofiles/tree/main/feature/security/gnsi/certz.

Can you help rename yours? Thanks. Basically:

  • Create a new folder with name, say authority_policy, and move your README.md there.
  • Move everything in your testdata to the existingtest_data.

@xw-g
Copy link
Collaborator

xw-g commented Jan 31, 2024

@danielywong just 2 comments about the file structure and I think we are good to merge, can you help address them?Thanks.

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.

4 participants