Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]Cognito credential provider support #306

Open
wants to merge 17 commits into
base: secitem_bindings
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .builder/actions/crt-ci-prep-xcodebuild.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Builder

class CrtCiPrepXCodebuild(Builder.Action):
Copy link
Contributor

@waahm7 waahm7 Jan 2, 2025

Choose a reason for hiding this comment

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

I haven't looked at the PR but can we avoid adding this action in crt-swift? We don't need to test the Cognito credential provider functionality in bindings; we can just create/destroy it for simple binding tests. The MQTT-specific tests should be in the IoT SDK.

This action makes it harder to run these tests locally. I think we will likely need this action for MQTT unit tests but we should try to avoid it if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This script change is used to allow passing environment variables into xcodebuild tests. Regardless of the Cognito credential provider changes, we still need it for the unit tests that requires environment variables.

def run(self, env):
env.shell.setenv("TEST_RUNNER_AWS_TESTING_STS_ROLE_ARN", env.shell.get_secret("aws-c-auth-testing/sts-role-arn"))
actions = [
Builder.SetupCrossCICrtEnvironment(use_xcodebuild=True)
]
return Builder.Script(actions, name='crt-ci-prep-xcodebuild')
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- 'main'

env:
BUILDER_VERSION: v0.9.73
BUILDER_SOURCE: releases
BUILDER_VERSION: xcodebuild_setup
BUILDER_SOURCE: channels
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: aws-crt-swift
RUN: ${{ github.run_id }}-${{ github.run_number }}
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ packageTargets.append(.target(
// we manually define the macros from `s2n_prelude.h`. When SwiftPM supports compiler flags
// or building packages using CMake, this hack should be removed.
// We are not defining `S2N_API` because we don't need to expose any symbols from S2N in crt-swift.
.define("_S2N_PRELUDE_INCLUDED"),
.define("_S2N_PRELUDE_INCLUDED"),
.define("S2N_BUILD_RELEASE"),
.define("_FORTIFY_SOURCE", to: "2"),
.define("POSIX_C_SOURCE", to: "200809L"),

]
))
#endif
Expand Down
286 changes: 204 additions & 82 deletions Source/AwsCommonRuntimeKit/auth/credentials/CredentialsProvider.swift

Large diffs are not rendered by default.

205 changes: 125 additions & 80 deletions Test/AwsCommonRuntimeKitTests/auth/CredentialsProviderTests.swift

Large diffs are not rendered by default.

Loading
Loading