Skip to content

feat: Add supplemental signals configuration for Akamai integration#1310

Open
ramya18101 wants to merge 2 commits intomasterfrom
DXCDT-1440-support-supplemental-signals
Open

feat: Add supplemental signals configuration for Akamai integration#1310
ramya18101 wants to merge 2 commits intomasterfrom
DXCDT-1440-support-supplemental-signals

Conversation

@ramya18101
Copy link
Contributor

@ramya18101 ramya18101 commented Feb 27, 2026

🔧 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

supplementalSignals:
      akamai_enabled: false

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

  • Unit tests Added

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@ramya18101 ramya18101 marked this pull request as ready for review February 27, 2026 06:56
@ramya18101 ramya18101 requested a review from a team as a code owner February 27, 2026 06:56
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 84.44444% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.20%. Comparing base (6c2a620) to head (5743e2c).

Files with missing lines Patch % Lines
src/tools/auth0/handlers/supplementalSignals.ts 78.26% 4 Missing and 1 partial ⚠️
.../context/directory/handlers/supplementalSignals.ts 85.71% 0 Missing and 2 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

rulesConfigs: Asset[] | null;
tenant: Tenant | null;
triggers: Asset[] | null;
supplementalSignals: Management.GetSupplementalSignalsResponseContent | null;
Copy link
Contributor

@kushalshit27 kushalshit27 Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep Management.GetSupplementalSignalsResponseContent on handler , please check other handler for reference

description: 'Enable Akamai supplemental signals integration',
},
},
additionalProperties: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {};
Copy link
Contributor

@kushalshit27 kushalshit27 Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return {};
return null;

});
}

async getType(): Promise<Asset> {
Copy link
Contributor

@kushalshit27 kushalshit27 Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
}
Copy link
Contributor

@kushalshit27 kushalshit27 Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this validation? this is not needed


if (!supplementalSignals) return;

if (supplementalSignals && Object.keys(supplementalSignals).length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Contributor

@kushalshit27 kushalshit27 Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
existing: SupplementalSignals;
existing: SupplementalSignals | null;

if (!supplementalSignals) return;

if (supplementalSignals && Object.keys(supplementalSignals).length > 0) {
await this.client.supplementalSignals.patch(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need 403 here?

import DirectoryContext from '..';
import { ParsedAsset } from '../../../types';

type ParsedSupplementalSignals = ParsedAsset<'supplementalSignals', { akamai_enabled?: boolean }>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use SDK interface

import YAMLContext from '..';
import { ParsedAsset } from '../../../types';

type ParsedSupplementalSignals = ParsedAsset<'supplementalSignals', { akamai_enabled?: boolean }>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use SDK interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants