-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Revert "[TT-5588] [OAS] gateway apiKey import generates unnecessary object" #7299
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
Revert "[TT-5588] [OAS] gateway apiKey import generates unnecessary object" #7299
Conversation
…bject (#…" This reverts commit 8b4fa8e.
PR Code Suggestions ✨Explore these optional code suggestions:
|
API Changes --- prev.txt 2025-08-12 11:17:31.617704362 +0000
+++ current.txt 2025-08-12 11:17:22.306675980 +0000
@@ -4555,7 +4555,7 @@
Enabled bool `bson:"enabled" json:"enabled"` // required
// AuthSources contains the configuration for authentication sources.
- AuthSources `bson:",inline" json:"-"`
+ AuthSources `bson:",inline" json:",inline"`
// EnableClientCertificate allows to create dynamic keys based on certificates.
// |
🚀 Performance Snapshot
## Performance Impact AnalysisThis PR reverts a previous change (#7270) that had excluded The performance impact is minimal as this only affects JSON serialization during API definition import/export operations, not request processing. The change doesn't introduce any new allocations or processing overhead in hot paths. ## Critical AreasThe change affects the OAS API definition serialization, which is not in a critical performance path. This operation typically happens during API creation, updates, or when loading configurations - not during request handling. The bot comment about ## Optimization RecommendationsNo performance optimizations are needed for this change. The PR correctly aligns the The PR removes a test that was specifically asserting that ## Summary
Tip: Mention me again using |
🚦 Connectivity Review Snapshot
## Connectivity Assessment
## Test Coverage Validation
## Security & Performance Impact
## Summary & Recommendations
Tip: Mention me again using |
📦 Impact Review Snapshot
## Impact AssessmentThis PR reverts a change that excluded The change is particularly relevant for tyk-operator which works directly with API definitions, and potentially portal which may display or manipulate these definitions. The impact on tyk-charts and tyk-sink is likely minimal since they typically don't directly manipulate API definition schemas. ## Required Updates
## Compatibility ConcernsThe change introduces a backward compatibility issue for any system that expects AuthSources fields to be excluded from Token JSON. Systems that were built to work with the previous JSON structure (where AuthSources fields were omitted) may now receive unexpected fields in the JSON output. Additionally, the PR comment notes a concern from GitHub Actions about the ## Summary & Recommendations
Tip: Mention me again using |
🛡️ Security Snapshot
## Security Impact AnalysisThis PR reverts a previous change (PR #7270) that had modified the JSON serialization behavior of the ## Identified VulnerabilitiesNo security vulnerabilities were identified in this change. The modification only affects JSON serialization format, not the actual authentication or authorization mechanisms. The change maintains consistent behavior between internal data structures and their JSON representation, aligning Token with other auth types (JWT, Basic, OAuth) that already use the inline approach for AuthSources. ## Security Recommendations
## OWASP ComplianceThis change does not impact OWASP Top 10 compliance:
## Summary
Tip: Mention me again using |
|
User description
TT-5588
Reverts #7270
PR Type
Bug fix, Tests
Description
Re-enable JSON inlining for
AuthSources
Remove test asserting non-serialization
Keep token auth fill/roundtrip behavior intact
Align JSON tags with intended API shape
Diagram Walkthrough
File Walkthrough
security.go
Re-enable JSON inlining for AuthSources in Token
apidef/oas/security.go
Token.AuthSources
JSON tag to",inline"
security_test.go
Delete test asserting AuthSources not serialized
apidef/oas/security_test.go
AuthSources
omission