Sha256: 66ef5f70c6888b77b0b582c0c4e2c480fb5de6d044985ac0d178479dbf03fd7a

Contents?: true

Size: 901 Bytes

Versions: 16

Compression:

Stored size: 901 Bytes

Contents

Shindo.tests('AWS::STS | assume role with web identity', ['aws']) do
  @sts    = Fog::AWS[:sts]
  @iam    = Fog::AWS[:iam]
  @role   = @iam.create_role('sts', Fog::AWS::IAM::EC2_ASSUME_ROLE_POLICY).body['Role']
  @token  = Fog::AWS::Mock.key_id

  @response_format = {
    'AssumedRoleUser' => {
      'Arn'           => String,
      'AssumedRoleId' => String,
    },
    'Audience'    => String,
    'Credentials' => {
      'AccessKeyId'     => String,
      'Expiration'      => Time,
      'SecretAccessKey' => String,
      'SessionToken'    => String,
    },
    'Provider'                    => String,
    'SubjectFromWebIdentityToken' => String,
  }

  tests("#assume_role_with_web_identity('#{@role['Arn']}', '#{@token}', 'fog')").formats(@response_format) do
    @sts.assume_role_with_web_identity(@role['Arn'], @token, 'fog', :iam => @iam).body
  end

  @iam.roles.get('sts').destroy
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fog-aws-3.12.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.11.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.10.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.9.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.8.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.7.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.6.7 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.6.6 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.6.5 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.6.4 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.6.3 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.6.2 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.5.2 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.5.1 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.5.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.4.0 tests/requests/sts/assume_role_with_web_identity_tests.rb