okta / okta-sdk-dotnet

A .NET SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Other
160 stars 100 forks source link

Deactivate IDP does not deactivate the routing rule pointing to the IDP unlike direct API call or the Okta UI #589

Closed aqib-bhat closed 1 year ago

aqib-bhat commented 2 years ago

Describe the bug?


P.S. On a side note: The Okta UI has also a weird bug where on trying to deactivate an IDP, the warning says that the following routing rules will be disabled but some of them are not pointing to the IDP being disabled but just happen to match part of the name. On clicking OK though, only the actually related routing rule gets deactivated but the message is confusing. image

What is expected to happen?

Just like what happens in the UI and through direct calls to the Okta API, deactivating an IDP through the Okta dotnet SDK should result in the IDP's routing rule(s) also getting deactivated.

What is the actual behavior?

Unlike what happens in the UI and through direct calls to the Okta API, deactivating an IDP through the Okta dotnet SDK only results in the IDP getting deactivated while it's routing rule(s) remain(s) Active.

Reproduction Steps?

Additional Information?

Ref:

.NET Version

6

SDK Version

5.6.0

OS version

bryanapellanes-okta commented 2 years ago

@aqib-bhat Thanks for bringing this to our attention and I apologize for the inconvenience. I've entered an internal issue to investigate further. This will need to be prioritized against other work.

Internal Ref: OKTA-537890

laura-rodriguez commented 2 years ago

Hi @aqib-bhat,

Thank you for reporting this issue. You mentioned that deactivating works when you hit the API directly. Would you mind sharing what that request looks like? Also, can you please share the requests the UI makes?

aqib-bhat commented 2 years ago

Thank you @bryanapellanes-okta for the quick acknowledgement and assurance!

aqib-bhat commented 2 years ago

Hi @laura-rodriguez Hitting the API directly, the request is:

aqib-bhat commented 2 years ago

@laura-rodriguez On the UI, when I deactivate an IDP with a routing rule, in the Network tab of Chrome Developer Tools, I see a call: image and Request Payload: image

laura-rodriguez commented 2 years ago

Thanks for sharing @aqib-bhat. According to the API docs, the SDK is making the request correctly. I wonder if this could be a UI sync issue 🤔 . What happens if you get the rules via the SDK after calling DeactivateAsync, do they look ACTIVE?

aqib-bhat commented 2 years ago

@laura-rodriguez I had also suspected initially that this is likely an eventual consistency issue. However, the status of the rule did not change even after a few hours. As you suggested, I also just tested again:

image

image

image

laura-rodriguez commented 2 years ago

Hi @aqib-bhat,

I wasn't able to reproduce this issue. I also added an integration test to verify that routing rules are deactivated when an IDP is deactivated here.

I confirmed with the API team that routing rules are deactivated ONLY if it's not being used by other IDPs. Please, let me know if you're still facing this issue, and I can redirect your case to customer support if necessary.

laura-rodriguez commented 1 year ago

Closing due to inactivity.