-
Notifications
You must be signed in to change notification settings - Fork 17
Implement SaaS-Based Approval Workflow for ClientIntents #569
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
base: main
Are you sure you want to change the base?
Conversation
…nto evya/approved_intents_crd
…raphQL mutations and queries for applied intents requests
…lientIntents for every clientIntents while the operator will wait for the migration to end.
1. When first reconciled - add finalizer 2. When deleted - trigger approvedClientIntent deletion a. If does not exist - remove finalizer b. If exists - delete approvedClientIntent and return 3. When approvedClientIntents is deleted - remove finalizer from clientIntents before removing its own
clientIntents| ExternallyManagedPolicyWorkloadsKey = "externallyManagedPolicyWorkloads" | ||
|
|
||
| EnableIntentsCloudApproval = "enable-intents-cloud-approval" | ||
| EnableIntentsCloudApprovalDefault = true |
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.
Change before merge
| ObservedGeneration int64 `json:"observedGeneration"` | ||
| // ResolvedIPs stores resolved IPs for a domain name - the network mapper populates it when DNS internetTarget is used | ||
| // +optional | ||
| ResolvedIPs []ResolvedIPs `json:"resolvedIPs,omitempty" yaml:"resolvedIPs,omitempty"` |
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.
Don't forget to open a PR to update the mapper with this change + release them together
| //+kubebuilder:rbac:groups=k8s.otterize.com,resources=postgresqlserverconfigs,verbs=get;list;watch;create;update;patch;delete | ||
| //+kubebuilder:rbac:groups=k8s.otterize.com,resources=mysqlserverconfigs,verbs=get;list;watch;create;update;patch;delete |
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.
Cleanup required RBAC permissions here
| // Will be handled elsewhere | ||
| return nil | ||
| } | ||
| if intents.Status.ReviewStatus == "" { |
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.
shouldn't this already be handled by the main flow? I'd expect the main flow to ensure the status is set.
Co-authored-by: Amit Lichtenberg <[email protected]>
Co-authored-by: Amit Lichtenberg <[email protected]>
Co-authored-by: Amit Lichtenberg <[email protected]>
Co-authored-by: Amit Lichtenberg <[email protected]>
Description
This pull request introduces a SaaS-based approval workflow for
ClientIntentswithin the Otterize intents-operator. By default, there are no changes to the user API unless explicitly configured by the user.Key Changes
ApprovedClientIntents CRD:
A new Custom Resource Definition (CRD) named
ApprovedClientIntentshas been added. This CRD representsClientIntentsresources that have been approved, facilitating a controlled and auditable access management process.Refactoring of Intents Reconciliation:
The existing
IntentsReconcilerlogic has been refactored intoApprovedIntentsReconciler. All operations previously triggered by the reconciliation of intents now utilize the newApprovedClientIntentsCRD, ensuring that only approved intents are enforced.Introduction of Approval Flow Reconciler:
A new reconciler has been implemented to handle the approval flow. By default, the operator auto-approves any
ClientIntents. If configured to integrate with the cloud, it reports theClientIntentsas access requests to the cloud and awaits approval status. Once a request is approved, it triggers the creation of anApprovedClientIntentsresource.Testing
Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.
Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.
Also include details of the environment this PR was developed in (language/platform/browser version).
Checklist