Sha256: c4e1afafc08ae0ba4cf0d323e7c68746634cf237c16d1b3fd3f0a18a484d7808

Contents?: true

Size: 868 Bytes

Versions: 43

Compression:

Stored size: 868 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
end

Version data entries

43 entries across 41 versions & 3 rubygems

Version Path
fog-aws-3.3.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.2.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.1.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aws-2.0.1/tests/requests/sts/assume_role_with_web_identity_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/tests/requests/sts/assume_role_with_web_identity_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aws-2.0.1/tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-3.0.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-2.0.1 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-2.0.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-1.4.1 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-1.4.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-1.3.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-1.2.1 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-1.2.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-1.1.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-1.0.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-0.13.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-0.12.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-0.11.0 tests/requests/sts/assume_role_with_web_identity_tests.rb
fog-aws-0.10.0 tests/requests/sts/assume_role_with_web_identity_tests.rb