Skip to content

Commit

Permalink
SNOW-1206259 Handle OKTA Auth invalid responses more gracefully (#884)
Browse files Browse the repository at this point in the history
### Description
Native OKTA SSO Authn improvements of error handling. 

### Checklist
- [x] Code compiles correctly
- [x] Code is formatted according to [Coding
Conventions](../CodingConventions.md)
- [x] Created tests which fail without the change (if possible)
- [x] All tests passing (`dotnet test`)
- [x] Extended the README / documentation, if necessary
- [x] Provide JIRA issue id (if possible) or GitHub issue id in PR name
  • Loading branch information
sfc-gh-mhofman authored Mar 13, 2024
1 parent f24b342 commit 7ea8366
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 104 deletions.
16 changes: 16 additions & 0 deletions Snowflake.Data.Tests/IntegrationTests/SFConnectionIT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2153,6 +2153,22 @@ public void TestAsyncOktaConnectionUntilMaxTimeout()
}
}
}

[Test]
[Ignore("This test requires established dev Okta SSO and credentials matching Snowflake user")]
public void TestNativeOktaSuccess()
{
var oktaUrl = "https://***.okta.com/";
var oktaUser = "***";
var oktaPassword = "***";
using (IDbConnection conn = new SnowflakeDbConnection())
{
conn.ConnectionString = ConnectionStringWithoutAuth +
$";authenticator={oktaUrl};user={oktaUser};password={oktaPassword};";
conn.Open();
Assert.AreEqual(ConnectionState.Open, conn.State);
}
}
}
}

Expand Down
Loading

0 comments on commit 7ea8366

Please sign in to comment.