Gcl-iam

Latest version: v0.9.0

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

0.3.1

None

0.3.0

**Added**
- **Standardized IAM Rule Representation**: Added `__str__` method to the `Rule` class (`gcl_iam/rules.py`) to generate IAM rule strings in the `{service}.{res}.{perm}` format.
- **Auth Attribute Access**: Introduced properties (`uuid`, `email`, `username`, etc.) in the `GenesisCoreAuth` class for streamlined access to authentication attributes.
- **Test Client Utilities**:
- CRUD operation methods for managing users, roles, and permissions in `GenesisCoreTestNoAuthRESTClient`.
- Methods to bind permissions to roles and roles to users.
- New `GenesisCoreTestNoAuthRESTClient` class for unauthenticated API testing.
- **JWT Authentication Support**:
- Token generation (HS256 algorithm) and auth header insertion in `DummyGenesisCoreTestRESTClient`.
- Environment variable `HS256_KEY` to configure the JWT secret key (default: `'secret'` if unset).

**Fixed**
- **Code Organization**: Refactored authentication and test setup logic into dedicated classes for improved maintainability.

**Updated**
- **DummyDriver**: Added `init` method to reset internal fields.
- **Test Clients**: Enhanced `DummyGenesisCoreTestRESTClient` to use JWT-based authentication for testing workflows.

0.2.0

**New Features & Enhancements**
- **IAM Functional Test Clients**: Introduced new test client classes to streamline IAM authentication and REST operations testing.
- `GenesisCoreAuth`: Handles OAuth2 password grant flow, including token URL generation, password-based auth parameters, and refresh token management.
- `GenesisCoreTestRESTClient`: Simplifies REST API interactions with built-in authentication, header management, and URI utilities. Features:
- Automated bearer token handling and auth caching to minimize token refresh overhead.
- Implementations for GET, POST, PUT, DELETE methods with auth headers.
- Resource/collection URI builders for consistent endpoint construction.

0.1.0

- **Fixes:**
- Introspect URL and Bearer Auth header were incorrectly set.
- Project ID was not properly handled during introspection.

- **Introductions:**
- Introduced the `Rule()` object for better rule management in IAM engine.

- **Improvements:**
- Moved empty introspection exceptions into the engine.
- Optimized permission parsing and beautified controllers.
- Added enforcer into the IAM Engine, which optimizes permissions handling.

- **Controllers:**
- Filtered `get` requests with project ID in policy controllers.

- **Policies:**
- Introduced policy controllers for better control over IAM policies.

- **Logging:**
- Added debug logging to improve system observability.

0.0.1

Implement IAM (Identity and Access Management) functionality

This commit introduces the core functionality for Identity and Access Management (IAM) in the Genesis Core Library. The implementation includes the following key components:

Added
- **Algorithms**: Added `HS256` algorithm for JWT token encoding and decoding.
- **Contexts**: Introduced `GenesisCoreAuthContext` for managing IAM sessions and context storage.
- **Drivers**: Added `AbstractAuthDriver`, `DummyDriver`, and `HttpDriver` for token introspection and authentication.
- **Enforcers**: Implemented `Enforcer` class for permission enforcement with support for wildcard permissions and hierarchical access control.
- **Engines**: Added `IamEngine` for handling authentication tokens and introspection.
- **Middlewares**: Implemented `GenesisCoreAuthMiddleware` for integrating IAM into REST API workflows.
- **Tokens**: Added `BaseToken`, `AuthToken`, `IdToken`, and `RefreshToken` classes for handling different types of tokens.

Tests
- Added unit tests for the `Enforcer` class to validate permission enforcement logic

Page 3 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.