public void GetBasicCredentialsNoUserCrypto() { using (var fixture = new EncryptedStoreTestFixture(SettingsConstants.RegisteredSAMLEndpoints, null, false)) { Assert.AreEqual(BasicCredentials, AWSCredentialsFactory.GetAWSCredentials(BasicProfile, ProfileStore)); } }
public void GetAssumeRoleProfileSourceNotBasicOrSessionAnonymous() { using (var fixture = new EncryptedStoreTestFixture(SettingsConstants.RegisteredSAMLEndpoints)) { (new SAMLEndpointManager()).RegisterEndpoint(SomeSAMLEndpoint); AssertAssumeRoleCredentialsAreEqual(AssumeRoleProfileSAMLSourceCredentials, AWSCredentialsFactory.GetAWSCredentials(AssumeRoleProfileSAMLRoleSource.Options, ProfileStore)); } }
public void GetSAMLRoleUserIdentityCredentialsAnonymous() { using (var fixture = new EncryptedStoreTestFixture(SettingsConstants.RegisteredSAMLEndpoints)) { (new SAMLEndpointManager()).RegisterEndpoint(SomeSAMLEndpoint); AssertFederatedCredentialsAreEqual(FederatedUserIdentityCredentials, AWSCredentialsFactory.GetAWSCredentials(SAMLRoleUserIdentityProfile.Options, ProfileStore)); } }
public void GetSAMLRoleCredentialsNoUserCrypto() { using (var fixture = new EncryptedStoreTestFixture(SettingsConstants.RegisteredSAMLEndpoints, null, false)) { AssertExtensions.ExpectException(() => { AWSCredentialsFactory.GetAWSCredentials(SAMLRoleProfile, ProfileStore); }, typeof(InvalidDataException), "Federated credentials are not available on this platform."); } }
public void InitializeTest() { fixture = new EncryptedStoreTestFixture(RoleSessionsFilename); manager = new SAMLRoleSessionManager(); DateTime now = DateTime.UtcNow; // The expiration is only stored to the second in our JSON nowToTheSecond = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second, DateTimeKind.Utc); yesterday = nowToTheSecond.AddDays(-1); tomorrow = nowToTheSecond.AddDays(1); samlCredentials = new SAMLImmutableCredentials("AccessKey", "SecretKey", "Token", tomorrow, "Subject"); expiredSamlCredentials = new SAMLImmutableCredentials("AccessKey", "SecretKey", "Token", yesterday, "Subject"); }
public void Initialize() { fixture = new EncryptedStoreTestFixture(SettingsConstants.RegisteredRoleSessions); }
public void CreateFixture() { fixture = new EncryptedStoreTestFixture(EndpointsFilename); manager = new SAMLEndpointManager(); }