Skip to content

sia: lambda identity support for web identity tokens - #3451

Open
havetisyan wants to merge 1 commit into
masterfrom
sia-lambda-web-identity
Open

sia: lambda identity support for web identity tokens#3451
havetisyan wants to merge 1 commit into
masterfrom
sia-lambda-web-identity

Conversation

@havetisyan

@havetisyan havetisyan commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Add GetAthenzServiceIdentity to the aws lambda sia library. It takes an AthenzIdentityRequest struct carrying all the attributes supported by the now deprecated GetAthenzIdentity method plus the ones required to fully support fetching identities based on either aws temporary credentials or web identity tokens: aws account, region, regional sts, omit domain, iam role path, instance id san dns, and the web identity audience, signing algorithm, duration and tags.

The web identity implementation follows the CloudAttestationData handling in the ec2 provider - the audience defaults to the zts url, and the sia defaults of ES384 and 300 seconds are applied when not specified.

Description

Contribution Checklist:

  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Attach Screenshots (Optional)

Add GetAthenzServiceIdentity to the aws lambda sia library. It takes an
AthenzIdentityRequest struct carrying all the attributes supported by the
now deprecated GetAthenzIdentity method plus the ones required to fully
support fetching identities based on either aws temporary credentials or
web identity tokens: aws account, region, regional sts, omit domain, iam
role path, instance id san dns, and the web identity audience, signing
algorithm, duration and tags.

The web identity implementation follows the CloudAttestationData handling
in the ec2 provider - the audience defaults to the zts url, and the sia
defaults of ES384 and 300 seconds are applied when not specified.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 15, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the Go AWS Lambda SIA library to support requesting Athenz X.509 service identity certificates using either (a) STS assume-role temporary credentials (existing behavior) or (b) AWS-issued OIDC web identity tokens (JWT), aligning Lambda support with the broader AWS SIA web identity attestation flow.

Changes:

  • Added GetAthenzServiceIdentity(*AthenzIdentityRequest) API with request fields covering both temp-credential and web-identity attestation inputs (including defaults for signing algorithm and duration).
  • Implemented attestation selection logic (getAthenzAttestationData) to produce either temp-credential or web-identity attestation payloads.
  • Added comprehensive unit tests including a mock ZTS /instance endpoint and stubs for STS attestation/token fetching.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
libs/go/sia/aws/lambda/lambda.go Introduces AthenzIdentityRequest and GetAthenzServiceIdentity with web identity token attestation support and sensible defaults.
libs/go/sia/aws/lambda/lambda_test.go Adds new tests validating request validation, defaulting, temp-credential path, web-identity path, and ZTS error handling via a mock ZTS server.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants