Commit 0f1d76e
Upgrade IAM authentication API: Batch role operations and standardized role paths (#76)
* Fix IAM service proto field numbering and validation
Corrects field numbering in user service requests (roles field 4→2),
adds missing required validation to name fields, and updates
documentation for consistency with plural role operations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update IAM resource protos for role path format changes
Updates APIUser and User resource definitions to use new role path
format (groups/{id}/roles/{role_id}), adds required validation to
roles fields, and enhances validation to support variable-length
role IDs (7-8 digits). Also fixes protobuf syntax by removing
trailing commas from buf.validate options.
Breaking: User.roles field number changed from 6 to 5.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix APIUser documentation capitalization
Updates "api user" to "API user" in the roles field documentation
for consistent capitalization throughout the file.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix API user documentation capitalization consistency
Standardizes capitalization across api_user.proto documentation:
- "api user" → "API user" (3 instances)
- "api key" → "API user" (display_name field - corrects incorrect reference)
- "api keys" → "API keys" (2 instances in enum comments)
No field numbers or validation logic modified.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix sequential field numbering in api_user.proto
Corrects field numbers to be sequential (1-6) removing gaps:
- display_name: 4 → 3
- state: 5 → 4
- roles: 6 → 5
- api_key: 7 → 6
user.proto already has correct sequential numbering (1-4).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix field numbering
* allow empty role slice on user and api user
* remove unused class file
* Update Python SDK for new role format and batch operations
Update role utilities to use 4-part format (groups/{id}/roles/{role}),
update service interfaces for batch role assignment/revocation, and update
all tests and validation. All 38 IAM tests passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add role path utility functions and tests to TypeScript SDK
Implements utility functions for the new role path format (groups/{ULIDv2}/roles/{role_id}):
- createRolePath: constructs valid role paths with ULID and role ID validation
- isValidRolePath: validates role path format including Crockford base32 alphabet
- extractRoleIdFromPath: extracts role ID from valid paths
- extractGroupFromRolePath: extracts group resource name from paths
Includes comprehensive test suite with 39 tests covering:
- Valid 7 and 8 digit role IDs
- ULID validation (Crockford base32, excludes I, L, O, U)
- Old format rejection
- Edge cases and boundary conditions
All 362 tests passing. TypeScript build and lint successful.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update Go SDK for role path format and batch operations
- Add /roles/ segment to role paths (groups/{id}/roles/{role_id})
- Change singular to plural operations (AssignRole→AssignRoles, RevokeRole→RevokeRoles)
- Update field from Role string to Roles []string for batch operations
- Add comprehensive RevokeRoles validation test suites
- Update all test cases to new role path format (47-48 chars, pattern [1-9][0-9]{6,7})
- Regenerate protobuf files with updated message types and field numbering
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update documentation for batch role operations
Remove old singular role assignment/revocation documentation and add new
batch operations documentation for both API users and regular users.
Changes:
- Remove assign-role-to-a-p-i-user and revoke-role-from-a-p-i-user docs
- Remove assign-role-to-user documentation
- Add assign-roles-to-a-p-i-user and revoke-roles-from-a-p-i-user docs
- Add assign-roles-to-user and revoke-roles-from-user docs
- Update API user service index with new method names
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2267ca0 commit 0f1d76e
60 files changed
Lines changed: 2398 additions & 1206 deletions
File tree
- docs/docs/api-reference/iam
- api_user/v1
- service
- assign-role-to-a-p-i-user
- assign-roles-to-a-p-i-user
- revoke-role-from-a-p-i-user
- revoke-roles-from-a-p-i-user
- user/v1/service
- assign-role-to-user
- assign-roles-to-user
- revoke-roles-from-user
- go/iam
- api_user/v1
- user/v1
- java/src
- main/java/co/meshtrade/api/iam
- api_user/v1
- role/v1
- test/java/co/meshtrade/api/iam
- api_user/v1
- role/v1
- proto/meshtrade/iam
- api_user/v1
- user/v1
- python
- src/meshtrade/iam
- api_user/v1
- role/v1
- user/v1
- tests/unit/iam
- api_user/v1
- role/v1
- ts/src/meshtrade/iam/role/v1
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 0 additions & 34 deletions
This file was deleted.
0 commit comments