feat: Add supplemental signals configuration for Akamai integration#1310
Open
ramya18101 wants to merge 2 commits intomasterfrom
Open
feat: Add supplemental signals configuration for Akamai integration#1310ramya18101 wants to merge 2 commits intomasterfrom
ramya18101 wants to merge 2 commits intomasterfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1310 +/- ##
==========================================
+ Coverage 80.17% 80.20% +0.03%
==========================================
Files 149 152 +3
Lines 6048 6093 +45
Branches 1237 1245 +8
==========================================
+ Hits 4849 4887 +38
- Misses 685 689 +4
- Partials 514 517 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| rulesConfigs: Asset[] | null; | ||
| tenant: Tenant | null; | ||
| triggers: Asset[] | null; | ||
| supplementalSignals: Management.GetSupplementalSignalsResponseContent | null; |
Contributor
There was a problem hiding this comment.
keep Management.GetSupplementalSignalsResponseContent on handler , please check other handler for reference
| description: 'Enable Akamai supplemental signals integration', | ||
| }, | ||
| }, | ||
| additionalProperties: false, |
Contributor
There was a problem hiding this comment.
better to remove it: additionalProperties: false,
| log.debug( | ||
| 'Supplemental Signals feature is not available for this tenant. Please verify `scope` or contact Auth0 support to enable this feature.' | ||
| ); | ||
| return {}; |
Contributor
There was a problem hiding this comment.
Suggested change
| return {}; | |
| return null; |
| }); | ||
| } | ||
|
|
||
| async getType(): Promise<Asset> { |
Contributor
There was a problem hiding this comment.
Suggested change
| async getType(): Promise<Asset> { | |
| async getType(): Promise<Asset | null> { |
Comment on lines
+45
to
+49
| async validate(assets: Assets): Promise<void> { | ||
| const { supplementalSignals } = assets; | ||
|
|
||
| if (!supplementalSignals) return; | ||
| } |
Contributor
There was a problem hiding this comment.
Do we need this validation? this is not needed
|
|
||
| if (!supplementalSignals) return; | ||
|
|
||
| if (supplementalSignals && Object.keys(supplementalSignals).length > 0) { |
Contributor
There was a problem hiding this comment.
Suggested change
| if (supplementalSignals && Object.keys(supplementalSignals).length > 0) { | |
| if (Object.keys(supplementalSignals).length > 0) { |
| export type SupplementalSignals = Management.GetSupplementalSignalsResponseContent; | ||
|
|
||
| export default class SupplementalSignalsHandler extends DefaultHandler { | ||
| existing: SupplementalSignals; |
Contributor
There was a problem hiding this comment.
Suggested change
| existing: SupplementalSignals; | |
| existing: SupplementalSignals | null; |
| if (!supplementalSignals) return; | ||
|
|
||
| if (supplementalSignals && Object.keys(supplementalSignals).length > 0) { | ||
| await this.client.supplementalSignals.patch( |
| import DirectoryContext from '..'; | ||
| import { ParsedAsset } from '../../../types'; | ||
|
|
||
| type ParsedSupplementalSignals = ParsedAsset<'supplementalSignals', { akamai_enabled?: boolean }>; |
| import YAMLContext from '..'; | ||
| import { ParsedAsset } from '../../../types'; | ||
|
|
||
| type ParsedSupplementalSignals = ParsedAsset<'supplementalSignals', { akamai_enabled?: boolean }>; |
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.
🔧 Changes
Adds support for the supplemental signals endpoint, enabling configuration of third-party security integrations (Akamai)
Document the new resource with YAML and directory examples and seed sample configs in examples/.
Examples
YAML format
JSON format
Configuration:
{ "akamai_enabled": true }📚 References
https://auth0.com/docs/api/management/v2/supplemental-signals/get-supplemental-signals
https://auth0.com/docs/api/management/v2/supplemental-signals/patch-supplemental-signals
🔬 Testing
📝 Checklist