teleport/integrations
Jakub Nyckowski e13137016c
Add 'promoted' access request state (#31346)
* This change introduces a new 'promoted' access request state. The state represents that an access request has been promoted to an access list.

Affected code was modified to adjust to the new promoted state and ensure correct system's behavior.

Added a new 'GetAccessRequest' method for internal use to retrieve access request info.
Disallowed direct promotion of access requests. Introduced 'SubmitAccessReviewAllowPromotion' for promotions.
Added 'PromoteAccessRequest' method and updated its usage to restrict direct promotions.
Refactored code for better readability and testing. Renamed some functions, simplified logic, added test helpers.
Introduced 'promoted' state for access requests to handle promotion workflow.
Added 'PromotedAccessListTitle' in 'AccessReview' to track promotion state.

* Refactor function and message names for better clarity

The function and message names related to the promotion of an access request to an access list were restructured for better readability and consistency. Names like 'PromoteAccessReqResponse'  have been replaced with more descriptive names such as 'PromoteAccessRequestResponse'. This increases clarity and consistency across the project.

* Remove the hacky GRPC server implementation

* Change method names to be more descriptive

Renamed all instances of 'PromoteAccessRequest' to 'AccessRequestPromote' in multiple files. The new method name provides a more descriptive and clear understanding of the method's function, which improves code readability and maintenance. This change applies to method definitions, comments, and error messages.

* Refine error message and introduce IsPromoted method

Refined the error message in 'access_request.go' to better indicate that only promoted requests can set the promoted access list title, not just have one. This enhances clarity of error message. Additionally, introduced 'IsPromoted' method in 'access_request.go' file. This method will be useful for quickly checking if a request is in the PROMOTED state.

* Rename variable in SubmitAccessReview method

Renamed the variable "params" to "submission" in the 'SubmitAccessReview' function, in 'auth_with_roles.go' file. The name "submission" provides clearer indictation of its role in submitting access review. This enhances code readability and understandability. No logic changes were made during this update.
2023-09-26 18:46:50 +00:00
..
access Add 'promoted' access request state (#31346) 2023-09-26 18:46:50 +00:00
kube-agent-updater Bump the go group in /integrations/kube-agent-updater with 1 update (#32011) 2023-09-18 15:45:48 +00:00
lib Add 'promoted' access request state (#31346) 2023-09-26 18:46:50 +00:00
operator Add support for Protobuf Enums into Operator CRDs (#32469) 2023-09-26 13:43:50 +00:00
Makefile Vendor slack plugin and supporting libraries (#23045) 2023-03-22 19:39:07 +00:00