-
Couldn't load subscription status.
- Fork 4
Support Owner Role Name and OwnerRole ID in Issuer / ClusterIssuer configuration #45
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
Support Owner Role Name and OwnerRole ID in Issuer / ClusterIssuer configuration #45
Conversation
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.
Pull Request Overview
This PR adds support for OwnerRoleName and OwnerRoleId fields to Issuer and ClusterIssuer configurations, providing the ability to specify certificate ownership roles during enrollment. The implementation includes comprehensive testing coverage and refactoring to improve unit testability.
- Added
OwnerRoleNameandOwnerRoleIdfields to both Issuer and ClusterIssuer specs with precedence logic (ID takes precedence over name) - Refactored the CSR enrollment request generation into a separate
buildCsrEnrollRequestmethod for better unit testing - Enhanced end-to-end tests to cover both Issuer and ClusterIssuer resources with the new owner role functionality
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/controller/certificaterequest_controller.go | Passes new owner role fields from issuer spec to command configuration |
| internal/command/command_test.go | Adds comprehensive unit tests for the new buildCsrEnrollRequest method and owner role functionality |
| internal/command/command.go | Implements owner role support in CSR enrollment with annotation override capability |
| e2e/run_tests.sh | Extends e2e tests to validate owner role functionality for both Issuer and ClusterIssuer resources |
| Multiple CRD files | Updates Custom Resource Definitions to include ownerRoleId and ownerRoleName fields |
| Documentation files | Updates README and documentation to describe the new owner role fields and their usage |
docsource/content.md
Outdated
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | ||
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | |
Copilot
AI
Jul 24, 2025
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.
There is a spelling error in 'tkae' which should be 'take'.
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will take precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will take precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | |
docsource/content.md
Outdated
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | ||
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | |
Copilot
AI
Jul 24, 2025
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.
There is a spelling error in 'tkae' which should be 'take'.
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will take precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will take precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | |
README.md
Outdated
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | ||
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | |
Copilot
AI
Jul 24, 2025
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.
There is a spelling error in 'tkae' which should be 'take'.
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will take precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will take precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | |
README.md
Outdated
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | ||
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | |
Copilot
AI
Jul 24, 2025
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.
There is a spelling error in 'tkae' which should be 'take'.
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will tkae precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleId | The ID of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will take precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | | |
| | ownerRoleName | The name of the security role assigned as the certificate owner. The security role must be assigned to the identity context of the issuer. If `ownerRoleId` and `ownerRoleName` are both specified, `ownerRoleId` will take precedence. This field is **required** if the enrollment pattern, certificate template, or system-wide setting requires it. | |
Signed-off-by: Matthew H. Irby <matt.irby@outlook.com>
OwnerRoleNameandOwnerRoleIdin ClusterIssuer resources. This field may be required if the certificate template / enrollment pattern / system-wide setting requires it.