feat(jwt-templates): add permission, subject, and jti claim configuratio#242
Merged
shilgapira merged 7 commits intomainfrom Feb 19, 2026
Merged
feat(jwt-templates): add permission, subject, and jti claim configuratio#242shilgapira merged 7 commits intomainfrom
shilgapira merged 7 commits intomainfrom
Conversation
…TI claims Add three new configuration options to JWT templates: - exclude_permission_claim: Boolean to exclude permissions claim from JWT - override_subject_claim: String to override the standard sub claim - add_jti_claim: Boolean to add JTI (JWT ID) claim for uniqueness tracking These options were missing from the Terraform provider but are available in the Descope console UI. This change adds support for: - Excluding the permission claim from JWT tokens - Overriding the subject claim with a custom value - Adding a JTI claim to JWT tokens Updated files: - JWT template model with new attributes and serialization - Documentation strings for the new fields - Test cases to verify the new attributes - Generated Terraform registry documentation
There was a problem hiding this comment.
Pull request overview
Adds missing JWT template configuration options to the Terraform provider so users can control permission, subject, and JTI claim behavior.
Changes:
- Extends JWT template schema/model with
exclude_permission_claim,override_subject_claim, andadd_jti_claim. - Serializes/deserializes the new fields to/from API payloads.
- Regenerates docs and updates JWT template tests accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| internal/models/project/jwttemplates/jwttemplates_test.go | Adds assertions/config for the three new JWT template attributes. |
| internal/models/project/jwttemplates/jwttemplate.go | Adds schema + model fields and maps them in Values() / SetValues(). |
| internal/docs/docs.go | Adds documentation strings for the new JWT template attributes. |
| docs/resources/project.md | Updates generated registry docs to include the new JWT template fields (but also removes unrelated connector-auth doc details). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aviadl
commented
Feb 11, 2026
Member
Author
|
@shuni please see my comments |
|
🐕 Done! Updated PR: #242 📋 Actions Taken✅ Fix override_subject_claim to be boolean instead of string |
Change override_subject_claim from string to boolean in JWT template
configuration based on PR review feedback. This attribute should be a
toggle to enable/disable the override feature, not a string value.
Changes:
- Changed attribute type from stringattr.Default("") to boolattr.Default(false)
- Updated model field type from stringattr.Type to boolattr.Type
- Updated Values() and SetValues() methods to use boolattr functions
- Updated test cases to use boolean value (true instead of "custom-sub")
- Updated documentation strings and generated docs
shilgapira
approved these changes
Feb 19, 2026
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
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.
Fixes descope/etc#14107
View workflow run
Perfect! All tasks are completed. Let me create a summary of what was done:
Summary
I've successfully added the three missing JWT template configuration options to the Descope Terraform provider:
Changes Made
New JWT Template Attributes (in
internal/models/project/jwttemplates/jwttemplate.go):exclude_permission_claim(Boolean) - Excludes the permissions claim from JWT tokensoverride_subject_claim(String) - Overrides the standardsubclaim with a custom valueadd_jti_claim(Boolean) - Adds ajti(JWT ID) claim for uniqueness trackingUpdated Model Structure:
JWTTemplateModelstructValues()method to serialize new fields (using camelCase for API:excludePermissionClaim,overrideSubjectClaim,addJtiClaim)SetValues()method to deserialize new fields from API responsesDocumentation:
internal/docs/docs.godocs/resources/project.mdTests:
internal/models/project/jwttemplates/jwttemplates_test.goto include the new attributesVerification:
Commit Details
Created commit
8d0cd03with message:The changes are now ready. The GitHub Actions workflow will handle pushing and creating the PR as per your configuration.
Created by Shuni 🐕