Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added necessary cookies to get valid ADFS endpoint for organization. #637

Closed
wants to merge 1 commit into from

Conversation

mnspodrska
Copy link

@mnspodrska mnspodrska commented Dec 4, 2023

Closes #556.

  • Added necessary cookies to get valid ADFS endpoint for organization.
  • Tested with saml_auth_adfs and works fine
  • Also tested with terraform-provider-vcd 3.10 and works fine

@dataclouder @Didainius

…loses #556.

Signed-off-by: Marko Uskokovic <17175348+mnspodrska@users.noreply.github.com>
@vmwclabot
Copy link
Member

@mnspodrska, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

@vmwclabot
Copy link
Member

@mnspodrska, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

@vmwclabot
Copy link
Member

@mnspodrska, VMware has approved your signed contributor license agreement.

@mnspodrska
Copy link
Author

Ok, I got my approval, now to comment :)

This is a small change to make SAML auth work, but I figured it was problematic to test. So we have a working test VCD 10.5 environment with ADFS login for provider portal (not the tenants) where terraform is for managing resources. I was trying to SAML auth working and got stuck with VCD sending redirects from /login/System/saml/login/alias/vcd to /adfs/services/trust/13/usernamemixed of the VCD address, not the auth server. Then I found #556 and I grabbed time to test what needs to be changed and where. Patched it, compiled samples/saml_auth_adfs and it worked. Then I tested compiling terraform-provider-vcd against this version of go-vcloud-director and now my SAML auth finally works in terraform.

Now, I am aware that you have big plans to change more things to use cloud-api, but until then, this fix would allow us to use SAML login in go-vcloud-director and terraform even before the whole rewrite.

Would you consider merging it soon so that soon to be released terraform provider for VCD catches it for the next release?

@lvirbalas
Copy link
Collaborator

Hello @mnspodrska ,

Thank you for your contribution. Sorry, but it's too late for the next release of the provider, as it is in the final pre-release stages now. Also, though this PR is a one-liner it requires extensive testing and a security review.

@mnspodrska
Copy link
Author

Ok, please tell me if I can do anything else to help.

@mnspodrska
Copy link
Author

Any update on this? Can you consider merging it?

@dataclouder dataclouder removed the request for review from adezxc March 8, 2024 11:42
@zhenyatsk
Copy link

any updates?

@Didainius
Copy link
Collaborator

Hello,
One thing to check - is it fine I make some attempt to make this an optional configuration instead of being default one? The main reason is we're afraid to have side effects for someone who had it working like that

@mnspodrska
Copy link
Author

Hi,
If you need to do that to satisfy the form, do it, but the essence is that it simply does not work for anybody, so it is unlikely that there is anything to break even more than it is...

@Didainius
Copy link
Collaborator

Hi, If you need to do that to satisfy the form, do it, but the essence is that it simply does not work for anybody, so it is unlikely that there is anything to break even more than it is...

I know that at least 2 companies had it working (at least until recently)

@mnspodrska
Copy link
Author

That is interesting to hear, and I understand your hesitation. I guess that those companies are not available for running tests, so making tech depth is in order. Please tell me if I can help somehow...

@Didainius
Copy link
Collaborator

Didainius commented Aug 1, 2024

I will look at the option to leave current behaviour as it is, but also add a way to customise this. Are you using only the SDK or is it Terraform as well?

@Didainius Didainius removed the request for review from dataclouder August 1, 2024 11:01
@mnspodrska
Copy link
Author

I use it primarly with terraform, but also with SDK

@Didainius
Copy link
Collaborator

I use it primarily with terraform, but also with SDK

I have made an attempt to give you the customisation option but retain original behaviour (mainly to avoid surprises for other users).

I'd appreciate if you could validate and confirm that both - SDK and Terraform make it work for you

@mnspodrska
Copy link
Author

thank you very much! Will try it over weekend and report on Monday

@mnspodrska
Copy link
Author

I have tested, and something works, something does not work. See coment on vmware/terraform-provider-vcd#1298

@mnspodrska
Copy link
Author

mnspodrska commented Aug 28, 2024

I am closing this PR because it is implemented properly in vmware/terraform-provider-vcd#1298 and #699

@mnspodrska mnspodrska closed this Aug 28, 2024
@mnspodrska mnspodrska deleted the saml-redirect-fix branch August 28, 2024 05:37
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.

SAML Auth flow getting wrong ADFS endpoint
5 participants