1. Resources
  2. Detection rules
  3. IAM SAML or OIDC Identity Provider Created or Changed

IAM SAML or OIDC Identity Provider Created or Changed detection rules

An attacker with IAM write access registers a SAML or OIDC identity provider they control, or swaps the metadata of one that roles already trust, and then assumes roles from outside with no credential in the account.

Platform
AWS
Severity
High
Log source
AWS CloudTrail
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Credentials allowed to create or update an IAM SAML or OIDC identity provider, and a role whose trust policy names that provider.
Impact
Temporary credentials for every role that trusts the provider, requested from outside the account with no IAM user, password or access key involved.
Response
Upload the metadata of your real identity provider again or delete a provider you do not operate, then revoke the active sessions of every role that trusts it.
Mitigation
Restrict the IAM identity provider actions to a few identity administrators, deny them to everyone else with an SCP, and manage the providers as code.
CloudTrail events
DeleteSAMLProviderDeleteOpenIDConnectProviderRemoveClientIDFromOpenIDConnectProviderCreateOpenIDConnectProviderAddClientIDToOpenIDConnectProviderUpdateOpenIDConnectProviderThumbprintCreateSAMLProviderUpdateSAMLProvider

How the attack works

An IAM identity provider tells AWS which external SAML 2.0 or OpenID Connect issuer to trust. Roles name the provider as a federated principal in their trust policy, and AWS STS issues temporary credentials for the assertions or tokens that the provider signs (AssumeRoleWithSAML, AssumeRoleWithWebIdentity). A principal allowed to call iam:CreateSAMLProvider or iam:CreateOpenIDConnectProvider can register an issuer it runs; the provider becomes usable as soon as a role trusts it, through a new role or UpdateAssumeRolePolicy.

The quieter variant changes a provider that roles already trust. UpdateSAMLProvider replaces the metadata document, which holds the keys AWS uses to validate assertions, so every role that trusts the provider accepts assertions signed with the new key and no trust policy changes. AddClientIDToOpenIDConnectProvider registers another audience for an OIDC provider, and UpdateOpenIDConnectProviderThumbprint replaces its certificate thumbprints. CloudTrail records all five calls under iam.amazonaws.com, with the caller in userIdentity and the provider in requestParameters. Deleting a provider (DeleteSAMLProvider, DeleteOpenIDConnectProvider) is logged in the same way: every role that names the provider can no longer be assumed, and a rogue provider is removed like this after it has been used.

What an attacker needs

  • Credentials for a principal allowed to call iam:CreateSAMLProvider, UpdateSAMLProvider, CreateOpenIDConnectProvider, AddClientIDToOpenIDConnectProvider or UpdateOpenIDConnectProviderThumbprint.
  • For a new provider, a role whose trust policy names it, which the attacker creates or edits. For a changed provider, the roles that already trust it.

Impact

Temporary credentials for every role that trusts the provider, requested from outside the account with an identity provider the attacker runs. No IAM user, password or access key is involved, so the access survives credential rotation and does not show up in a review of users and keys.

Detection rules

IAM SAML or OIDC Identity Provider Deleted or Client ID Removed

Detects DeleteSAMLProvider, DeleteOpenIDConnectProvider and RemoveClientIDFromOpenIDConnectProvider calls. AWS documents that deleting a provider does not update the roles that name it in their trust policy, and that every attempt to assume such a role then fails. Deleting the provider your workforce or pipelines federate through therefore locks them out of those roles, and an attacker who registered a provider of their own deletes it afterwards to remove the trace. The Threat Technique Catalog for AWS lists DeleteSAMLProvider with the trust modification events. Read the provider ARN in the request parameters and check which roles name it. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelMediumStatusExperimentalLog sourceAWS CloudTrail
title: IAM SAML or OIDC Identity Provider Deleted or Client ID Removed
id: 86070051-bda8-4a0a-830c-562e0bf70e43
status: experimental
description: >-
  Detects DeleteSAMLProvider, DeleteOpenIDConnectProvider and
  RemoveClientIDFromOpenIDConnectProvider calls. AWS documents that deleting
  a provider does not update the roles that name it in their trust policy,
  and that every attempt to assume such a role then fails. Deleting the
  provider your workforce or pipelines federate through therefore locks
  them out of those roles, and an attacker who registered a provider of
  their own deletes it afterwards to remove the trace. The Threat Technique
  Catalog for AWS lists DeleteSAMLProvider with the trust modification
  events. Read the provider ARN in the request parameters and check which
  roles name it.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteSAMLProvider.html
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteOpenIDConnectProvider.html
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_RemoveClientIDFromOpenIDConnectProvider.html
  - https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html
  - https://attack.mitre.org/techniques/T1484/002/
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.t1484.002
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: iam.amazonaws.com
    eventName:
      - DeleteSAMLProvider
      - DeleteOpenIDConnectProvider
      - RemoveClientIDFromOpenIDConnectProvider
  condition: selection
falsepositives:
  - Decommissioning of an identity provider after a migration, and the removal of the OIDC provider of a deleted Amazon EKS cluster or a retired CI/CD integration by the platform team. Confirm the change record and that no role still names the provider.
level: medium

False positives

  • Decommissioning of an identity provider after a migration, and the removal of the OIDC provider of a deleted Amazon EKS cluster or a retired CI/CD integration by the platform team. Confirm the change record and that no role still names the provider.

IAM OIDC Identity Provider Created or Changed

Detects CreateOpenIDConnectProvider, AddClientIDToOpenIDConnectProvider and UpdateOpenIDConnectProviderThumbprint calls. They add an external OIDC issuer, add an audience to an existing one, or replace its certificate thumbprints. Check the issuer URL and audience in requestParameters against the providers your pipelines and clusters use. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelMediumStatusExperimentalLog sourceAWS CloudTrail
title: IAM OIDC Identity Provider Created or Changed
id: 3efa4bfa-2fad-4b65-944f-bf3c4bf58164
status: experimental
description: >-
  Detects CreateOpenIDConnectProvider, AddClientIDToOpenIDConnectProvider and
  UpdateOpenIDConnectProviderThumbprint calls. They add an external OIDC
  issuer, add an audience to an existing one, or replace its certificate
  thumbprints. Check the issuer URL and audience in requestParameters against
  the providers your pipelines and clusters use.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateOpenIDConnectProvider.html
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_AddClientIDToOpenIDConnectProvider.html
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateOpenIDConnectProviderThumbprint.html
  - https://attack.mitre.org/techniques/T1484/002/
author: Forestall
date: 2026-11-11
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.002
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: iam.amazonaws.com
    eventName:
      - CreateOpenIDConnectProvider
      - AddClientIDToOpenIDConnectProvider
      - UpdateOpenIDConnectProviderThumbprint
  condition: selection
falsepositives:
  - New Amazon EKS clusters that use IAM roles for service accounts, and CI/CD federation set up by the platform team (for example GitHub Actions); allow-list the provisioning roles and review issuers you do not recognize.
level: medium

False positives

  • New Amazon EKS clusters that use IAM roles for service accounts, and CI/CD federation set up by the platform team (for example GitHub Actions); allow-list the provisioning roles and review issuers you do not recognize.

IAM SAML Identity Provider Created or Updated

Detects CreateSAMLProvider and UpdateSAMLProvider calls. A new provider adds an external issuer that roles can trust; an update replaces the metadata document and with it the keys AWS accepts for every role that already trusts the provider. Compare the issuer and signing certificate with your identity provider. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelHighStatusExperimentalLog sourceAWS CloudTrail
title: IAM SAML Identity Provider Created or Updated
id: 66f3e9b0-3bb9-453b-9ef0-b847a1c2f6d9
status: experimental
description: >-
  Detects CreateSAMLProvider and UpdateSAMLProvider calls. A new provider adds
  an external issuer that roles can trust; an update replaces the metadata
  document and with it the keys AWS accepts for every role that already trusts
  the provider. Compare the issuer and signing certificate with your identity
  provider.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateSAMLProvider.html
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateSAMLProvider.html
  - https://attack.mitre.org/techniques/T1484/002/
author: Forestall
date: 2026-11-11
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.002
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: iam.amazonaws.com
    eventName:
      - CreateSAMLProvider
      - UpdateSAMLProvider
  condition: selection
falsepositives:
  - Onboarding of a new identity provider and scheduled rotation of its signing certificate by the identity team; confirm the change record and the certificate.
level: high

False positives

  • Onboarding of a new identity provider and scheduled rotation of its signing certificate by the identity team; confirm the change record and the certificate.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Identity provider created and deleted again within a short time

Detection hypothesisSequence of events

A provider that an attacker registers for one federated session is useful for an hour and evidence afterwards. Creation, a role assumption through the provider and its deletion, all within a short time, is not how an identity team onboards an identity provider.

  1. A CreateSAMLProvider or CreateOpenIDConnectProvider event from iam.amazonaws.com. Note the provider named in the request parameters.
  2. Within 24 hours a DeleteSAMLProvider or DeleteOpenIDConnectProvider event whose request names the ARN of the same provider.
  3. Between the two, look for AssumeRoleWithSAML events from sts.amazonaws.com whose requestParameters.principalArn is the provider, or AssumeRoleWithWebIdentity events whose userIdentity.identityProvider is the provider, and review what those sessions did.

EventsCreateSAMLProviderDeleteSAMLProviderCreateOpenIDConnectProviderDeleteOpenIDConnectProviderAssumeRoleWithSAMLAssumeRoleWithWebIdentity

LimitsTests of a new federation setup produce the same pair, and so do short-lived Amazon EKS clusters whose OIDC provider is created and deleted with the cluster. The 24 hours are a starting point. A provider that is left in place does not match and is covered by the single-event rules on this page.

Triage

  • Identify the provider (name, URL or ARN in requestParameters) and the caller (userIdentity.arn), and check whether the issuer is one your organization operates.
  • For UpdateSAMLProvider, compare the issuer and signing certificate in the new metadata with your identity provider's current metadata; a planned certificate rotation is the usual legitimate cause.
  • List the roles whose trust policy names the provider, and look for AssumeRoleWithSAML or AssumeRoleWithWebIdentity calls on them after the change.
  • If not approved, restore or delete the provider, revoke the active sessions of the roles that trust it and review what those sessions did.

Response

Once the attack is confirmed:

  1. Take the trust away first. For a changed SAML provider, upload the metadata of your real identity provider again. Delete a provider you do not operate, remove a client ID that was added to an OIDC provider, and restore its previous thumbprints.
  2. Revoke the active sessions of every role whose trust policy names the provider. Credentials that were issued before the fix stay valid until they expire unless the sessions are revoked.
  3. Remove the trust policy statements and roles that were created for the rogue provider, so that registering the same issuer again does not restore the access.
  4. Contain the principal that made the change, and review what the federated sessions of the affected roles did after AssumeRoleWithSAML or AssumeRoleWithWebIdentity.
  5. Compare the remaining providers, their certificates, thumbprints and audiences with the issuers your organization operates, and confirm that sign-in through the restored provider works.

Mitigation

  • Restrict the IAM identity provider actions (create, update and delete for SAML and OIDC providers, and AddClientIDToOpenIDConnectProvider) to a few identity administrators, and deny them to everyone else with an SCP.
  • Manage identity providers as code, keep the list short, and compare it regularly (ListSAMLProviders, ListOpenIDConnectProviders) with the issuers your organization operates.
  • In trust policies that name an OIDC provider, require conditions on the audience and the subject, so that an audience added to the provider is not accepted by existing roles.

Frequently asked questions

Why is an update to an existing SAML provider harder to notice than a new provider?

A new provider is useless until a role trusts it, which takes a second change. `UpdateSAMLProvider` replaces the metadata document, and with it the keys AWS uses to validate assertions, for a provider that roles already trust. Every one of those roles then accepts assertions signed with the new key, and no trust policy changes.

Does restoring or deleting the provider end sessions that were already issued?

No. AWS STS has already issued temporary credentials for those sessions, and they keep working for the duration of the session. Revoke the active sessions of the roles that trust the provider. That makes AWS deny requests made with credentials that were issued before the moment of revocation.

What is a normal reason for these events?

For SAML, the onboarding of a new identity provider and the scheduled rotation of its signing certificate. For OIDC, new Amazon EKS clusters that use IAM roles for service accounts, and CI/CD federation set up by the platform team. In each case the issuer is one your organization uses and the caller is a known provisioning role.

Do these rules show the step that makes a new provider usable?

No. A new provider becomes usable once a role names it in its trust policy, through a new role or `UpdateAssumeRolePolicy`. Those are separate IAM events. After a provider has been created, search for roles whose trust policy names it.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.