Skip to content

Conversation

@crystall-bitquill
Copy link
Contributor

@crystall-bitquill crystall-bitquill commented Dec 6, 2025

Summary

feat: enable OTP and Push MFA for Okta

Description

  • removes the KEY_IAM_IDP_ARN key, which is a duplicate of KEY_IDP_SAML_ARN
  • adds MFA authentication to the Okta plugin

Updated GUI:
Screenshot 2025-12-05 173704
Screenshot 2025-12-05 173722

Testing

Manual testing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@crystall-bitquill crystall-bitquill force-pushed the feat/okta-2fa branch 7 times, most recently from e908d8b to b6570ce Compare December 6, 2025 07:31
Copy link
Contributor

@ColinKYuen ColinKYuen left a comment

Choose a reason for hiding this comment

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

Do you also have a screenshot of what the user will see when they are prompted for both the TOTP & Push challenge (not in terms of the phone but what the user will see while the driver is waiting for a response)?

& for manual testing, was it done for Windows, Linux & Mac?

Comment on lines 45 to 47
std::string VerifyTOTPChallenge(const std::string &verify_url, const std::string &state_token, const std::shared_ptr<Aws::Http::HttpClient>& http_client);

std::string VerifyPushChallenge(const std::string &verify_url, const std::string &state_token, const std::shared_ptr<Aws::Http::HttpClient> &http_client);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can these methods not access the http_client from the class already? Why do we need to pass them in again

#include "okta_auth_plugin.h"

#include <unordered_set>
#include <random>
Copy link
Contributor

Choose a reason for hiding this comment

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

Random doesn't seem used
***Moving this to the web servers util would make it more clear. Can also help by making that class into a namespace so when the function GenerateState() is called, we can tell its not coming from the okta class but the web server util

Comment on lines 76 to 80
////////////////////////////////////////////////////////////////////////////////////////////////////
inline AddrInformation::~AddrInformation()
{
freeaddrinfo(addrinfo_);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Couple of these throughout the header files inside the http folder. Can we move these inline constructors, deconstructors, & functions into the .cpp file (& creating one if it doesn't already exist)? Let's keep our .h as lightweight as possible


#if (defined(_WIN32) || defined(_WIN64))

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be able to remove this define WIN32_LEAN_AND_MEAN since it we do define it in our cmake

@crystall-bitquill
Copy link
Contributor Author

Do you also have a screenshot of what the user will see when they are prompted for both the TOTP & Push challenge (not in terms of the phone but what the user will see while the driver is waiting for a response)?

& for manual testing, was it done for Windows, Linux & Mac?

For Push challenges, there's no visible prompt on screen from the driver. For TOTP, if there's a browser available, the following window should appear:
Screenshot 2025-12-09 at 4 22 20 PM

Testing was on Windows, Linux, and Mac, but the Linux machine didn't have an available browser to test TOTP with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants