Skip to content

Conversation

fangpenlin
Copy link
Contributor

@fangpenlin fangpenlin commented Oct 3, 2025

Description 📣

Update Java SDK doc to reflect the newly added AWS auth feature introduced by this PR:

Infisical/java-sdk#9

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

@maidul98
Copy link
Collaborator

maidul98 commented Oct 3, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Summary

This PR adds comprehensive documentation for AWS Auth authentication in the Java SDK. The change introduces a new "AWS Auth" section to the Java SDK documentation that follows the established pattern of other authentication methods like Universal Auth and LDAP Auth.

The documentation covers the complete AWS Auth workflow for Java applications, including:

  • Method signature for AwsAuthLogin with AwsAuthLoginInput parameter
  • Manual parameter configuration approach where developers specify IAM request details (HTTP method, headers, body)
  • Helper class approach using AwsAuthProvider that simplifies common scenarios
  • Two helper methods: fromInstanceProfile() for EC2/EKS environments and fromCredentials() for manual credential management

This addition integrates well with Infisical's broader AWS Auth system, which enables AWS IAM principals (EC2 instances, Lambda functions, etc.) to authenticate using signed GetCallerIdentity requests. The documentation provides Java developers with the necessary tools to implement AWS Auth in their applications without hardcoding credentials, leveraging AWS IAM roles and instance profiles for secure authentication.

The helper classes significantly reduce the complexity of AWS Auth implementation by abstracting away the AWS Signature v4 signing process that would otherwise need to be manually implemented by developers.

Changed Files
Filename Score Overview
docs/sdks/languages/java.mdx 5/5 Added complete AWS Auth documentation section with method signatures, parameter descriptions, and usage examples

Confidence score: 5/5

  • This PR is extremely safe to merge with minimal risk as it only adds documentation
  • Score reflects documentation-only changes with no code modifications that could affect system behavior
  • No files require special attention as this is purely additive documentation

Sequence Diagram

sequenceDiagram
    participant User
    participant SDK as "InfisicalSdk"
    participant Auth as "Auth Component"
    participant AwsProvider as "AwsAuthProvider"
    participant AWS as "AWS STS Service"
    participant Secrets as "Secrets Component"
    participant API as "Infisical API"

    User->>SDK: "Create InfisicalSdk instance"
    SDK-->>User: "SDK instance created"
    
    User->>Auth: "AwsAuthLogin(input)"
    Auth->>AwsProvider: "Generate login credentials"
    AwsProvider->>AWS: "sts:GetCallerIdentity request"
    AWS-->>AwsProvider: "AWS credentials response"
    AwsProvider-->>Auth: "Signed request headers/body"
    Auth->>API: "Authenticate with AWS IAM credentials"
    API-->>Auth: "Authentication token"
    Auth-->>User: "Authentication successful"
    
    User->>Secrets: "GetSecret(name, projectId, env, path)"
    Secrets->>API: "Fetch secret with auth token"
    API-->>Secrets: "Secret data"
    Secrets-->>User: "Return Secret object"
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@fangpenlin fangpenlin changed the title WIP: [ENG-3808] Add document for java sdk aws auth login [ENG-3808] Add document for java sdk aws auth login Oct 3, 2025
@fangpenlin fangpenlin merged commit d0d623c into main Oct 3, 2025
6 checks passed
@fangpenlin fangpenlin deleted the ENG-3808-add-aws-auth-for-java-sdk branch October 3, 2025 23:25
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