Skip to content

feat(php): Add PHP authentication token generation sample#628

Open
gxjx-x wants to merge 8 commits intomainfrom
add-php-authentication
Open

feat(php): Add PHP authentication token generation sample#628
gxjx-x wants to merge 8 commits intomainfrom
add-php-authentication

Conversation

@gxjx-x
Copy link
Copy Markdown
Collaborator

@gxjx-x gxjx-x commented Mar 5, 2026

Add PHP SDK example for generating Aurora DSQL IAM authentication tokens using Aws\DSQL\AuthTokenGenerator with CredentialProvider::defaultProvider().

Includes PHPUnit integration tests and GitHub Actions workflow.

Validated against live Aurora DSQL cluster (us-east-1) with PHP 8.5 + aws/aws-sdk-php v3.371.

Supersedes #626 (closed — was from fork, CI couldn't access secrets).

gxjx-x added 2 commits March 5, 2026 09:15
Add PHP SDK example for generating Aurora DSQL IAM authentication tokens
using Aws\DSQL\AuthTokenGenerator with CredentialProvider::defaultProvider().

Validated against live cluster (us-east-1) with PHP 8.5 + aws/aws-sdk-php v3.371.
Two tests:
- testGenerateTokenReturnsNonEmptyString: verifies token is generated
- testTokenCanConnectToCluster: verifies token works for SELECT 1

Both validated against live cluster (us-east-1). Adds GitHub Actions workflow
php-authentication-integ-tests.yml following existing workflow patterns.
with:
workflow_name: php-authentication
secrets:
AWS_IAM_ROLE: ${{ secrets.PYTHON_IAM_ROLE }}
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.

We should probably create a different role here and not use the python one?

Copy link
Copy Markdown
Contributor

@amaksimo amaksimo left a comment

Choose a reason for hiding this comment

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

LGTM, slight comment on the workflow

javascript-node-postgres: ${{ steps.detect.outputs.javascript-node-postgres }}
javascript-postgresjs: ${{ steps.detect.outputs.javascript-postgresjs }}
lambda-nodejs: ${{ steps.detect.outputs.lambda-nodejs }}
php-authentication: ${{ steps.detect.outputs.php-authentication }}
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.

Interestingly, php is the only example with an auth-token CI. I guess we can add it to a backlog to add this for the rest of the samples.

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