-
Notifications
You must be signed in to change notification settings - Fork 40
feat(permission_set_saas): create resource, datasource, example, docs #286
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
Merged
semyonmor
merged 1 commit into
main
from
SLK-88696-tp-add-support-for-rbac-v-3-permission-sets
Feb 2, 2025
Merged
feat(permission_set_saas): create resource, datasource, example, docs #286
semyonmor
merged 1 commit into
main
from
SLK-88696-tp-add-support-for-rbac-v-3-permission-sets
Feb 2, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Shani Erman seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
4352b00 to
d4215b2
Compare
34cd61e to
11f2f60
Compare
5b18edc to
fd03f7b
Compare
fd03f7b to
44c331c
Compare
44c331c to
5add5ec
Compare
4838c7b to
920f7c3
Compare
376cb7d to
814fe34
Compare
53956a9 to
0311396
Compare
…K-88696] This change implements comprehensive support for RBAC v3 Permission Sets in Aqua SaaS environments through: Core Components: - New resource `aquasec_permission_set_saas` with full CRUD capabilities - New data source `aquasec_permissions_sets_saas` for querying permission sets - Client package implementing Permission Sets API operations - Integration with RBAC v3 API endpoints Client Package Changes: - Added saasUrl constant for SaaS environment API endpoints - New validateSaasEnv helper function to enforce SaaS-only operations: * Validates operations against clientType (Saas/SaasDev) * Returns descriptive errors for non-SaaS environments * Used across all SaaS permission set operations Resource Implementation Details: - Configurable attributes: * name (required, forces new resource) * description (optional) * ui_access (optional, defaults to true) * is_super (optional, defaults to false) * actions (optional list of allowed actions) - Import functionality for existing permission sets - State management with proper ID handling - External modification detection and reconciliation - Proper cleanup on resource deletion Data Source Implementation: - Lists all available permission sets - Supports filtering by name and ui_access - Returns full permission set details including actions - Random ID generation for empty result sets API Client Layer: - Complete CRUD operation support - Rate limiting implementation - Proper error handling and status code validation - Request authentication via Bearer tokens - Validation for SaaS environment compatibility Testing Coverage: - Unit tests for resource CRUD operations - Data source retrieval tests - Error handling scenarios: * Invalid configurations * API failures * External modifications * Missing resources * Permission validation - Import/export functionality verification - Edge cases for name lengths and action lists - Test coverage exceeding 80% Migration Support: - Warning message for legacy resource users - Documentation for migration path - Backwards compatibility considerations - Example configurations provided Documentation: - Resource and data source usage examples - Attribute descriptions and constraints - Import/export instructions - Migration guide from legacy resource - API endpoint references This implementation provides: 1. Complete coverage of SaaS platform permissions beyond workload protection 2. Cleaner API interface through RBAC v3 3. Improved validation and error handling 4. Comprehensive testing coverage 5. Clear migration path from legacy implementations Breaking Changes: - SaaS customers should migrate from aquasec_permissions_sets to aquasec_permission_set_saas - Legacy resource will display warning message for SaaS environments Tested in SaaS environment with various permission configurations and external modification scenarios.
0311396 to
569d506
Compare
semyonmor
approved these changes
Feb 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[SLK-88696]
This change implements comprehensive support for RBAC v3 Permission Sets in Aqua SaaS environments through:
Core Components:
aquasec_permission_set_saaswith full CRUD capabilitiesaquasec_permissions_sets_saasfor querying permission setsClient Package Changes:
Resource Implementation Details:
Data Source Implementation:
API Client Layer:
Testing Coverage:
Migration Support:
Documentation:
This implementation provides:
Breaking Changes:
Tested in SaaS environment with various permission configurations and external modification scenarios.