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

Add oauth2_authorization and openid_authentication #7617

Merged
merged 11 commits into from
Aug 17, 2020

Conversation

sirlatrom
Copy link
Contributor

Fixes #3341.

@jackofallops
Copy link
Member

Hi @sirlatrom
Thanks for this PR.

Could you rebase against origin master and skip the commit that includes the giovani dependencies? That should work fine and will clean up the PR some too. I will loop back to review asap.

Thanks!

Signed-off-by: Sune Keller <absukl@almbrand.dk>
…ApiManagementApi_basicClassic

Signed-off-by: Sune Keller <absukl@almbrand.dk>
…penidAuthentication

Signed-off-by: Sune Keller <absukl@almbrand.dk>
@sirlatrom
Copy link
Contributor Author

sirlatrom commented Jul 9, 2020

@jackofallops Rebased. Will rebase and try and find said commits to skip.

Update: Cannot find anything mentioning giovani in the git log or any files in the repo, so I think the outcome of the rebase was as expected.

Update 2: Found them by the name giovanni (two n's), but can see they are not in the current dependencies list.

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Hi @sirlatrom
Thanks for this PR, apologies it took a while to get back to it after the initial comments.
I've left some comments and suggestions below, and a question on the validation for the OAuth scope. I'm not sure how the service would react to an update that contained an empty string there, rather than a nil value? Could we add update tests that exercise changes on these?

Thanks

@jackofallops jackofallops added this to the v2.21.0 milestone Jul 23, 2020
sirlatrom and others added 2 commits July 23, 2020 13:42
Co-authored-by: Steve <11830746+jackofallops@users.noreply.github.com>
Co-authored-by: Steve <11830746+jackofallops@users.noreply.github.com>
@ghost ghost added size/XL and removed size/L labels Jul 23, 2020
Signed-off-by: Sune Keller <absukl@almbrand.dk>
Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Hi @sirlatrom
Thanks for the quick turnaround. Just a couple of errors in the tests to fix-up and this is good to go.

Thanks again!

Signed-off-by: Sune Keller <absukl@almbrand.dk>

Co-authored-by: Steve <11830746+jackofallops@users.noreply.github.com>
@sirlatrom
Copy link
Contributor Author

Hi @sirlatrom
Thanks for the quick turnaround. Just a couple of errors in the tests to fix-up and this is good to go.

Thanks again!

@jackofallops I've fixed the test errors as per your suggestions and the PR should be good to go now.

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Hi @sirlatrom

Apologies for taking so long to get back to this, it's been a busy few weeks.

I was about to run the acceptance tests and I spotted a panic (commented below) which sparked some additional schema implementation thinking (sorry!). If you can respond or update as you feel appropriate I'll try and stay on top of this one as quickly as I can.

ValidateFunc: validate.ApiManagementChildName,
},
"bearer_token_sending_methods": {
Type: schema.TypeSet,
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a set? Thinking over it, there are only 2 possible values, would it not be more appropriate to have these as individual bools?

Signed-off-by: Sune Keller <absukl@almbrand.dk>

Co-authored-by: Steve <11830746+jackofallops@users.noreply.github.com>
@sirlatrom
Copy link
Contributor Author

Hi @sirlatrom

Apologies for taking so long to get back to this, it's been a busy few weeks.

I was about to run the acceptance tests and I spotted a panic (commented below) which sparked some additional schema implementation thinking (sorry!). If you can respond or update as you feel appropriate I'll try and stay on top of this one as quickly as I can.

Thanks for finding that! Sets are used so rarely that it's error prone to follow my usual procedure: copy & paste.

Signed-off-by: Sune Keller <absukl@almbrand.dk>
@Geertvdc
Copy link

Geertvdc commented Aug 12, 2020

Hi, i bumped into this issue because it was exactly what we were missing. Nice to see that @sirlatrom took the time to add this ❤

The only thing blocking this is the very rarely used property bearerTokenSendingMethods which is an array in the Azure rest API as well. so the current solution of @sirlatrom seems to fit well for me because it is closer to the actual Azure API compared to 2 separate booleans.

What do you think is needed to close this pr @jackofallops

@tombuildsstuff tombuildsstuff modified the milestones: v2.23.0, v2.24.0 Aug 13, 2020
@jackofallops
Copy link
Member

Hi @sirlatrom - apologies for taking a while to get back to this again. I should have mentioned the knock on changes that would be needed to accept the previous suggestion, sorry. I've pushed what I think should sort that out so I can run the tests on this without tying up my laptop for hours (they take quite a while to run). I'll finish fixing up anything I've missed and get this merged asap.

@sirlatrom
Copy link
Contributor Author

Hi @sirlatrom - apologies for taking a while to get back to this again. I should have mentioned the knock on changes that would be needed to accept the previous suggestion, sorry. I've pushed what I think should sort that out so I can run the tests on this without tying up my laptop for hours (they take quite a while to run). I'll finish fixing up anything I've missed and get this merged asap.

It looks to me like you made the right changes. If you need me to do anything more on this PR I'll be able to do so Monday CEST.

@jackofallops
Copy link
Member

It looks to me like you made the right changes. If you need me to do anything more on this PR I'll be able to do so Monday CEST.

Thanks! I'm getting tired I think, made a silly mistake on the flatten so that panicked on the test run. I've fixed that and kicked it off again so I'll check the results first thing Monday.

@jackofallops
Copy link
Member

Tests passing:
image

@jackofallops jackofallops merged commit 10b165d into hashicorp:master Aug 17, 2020
jackofallops added a commit that referenced this pull request Aug 17, 2020
@sirlatrom sirlatrom deleted the fix-3341 branch August 17, 2020 07:44
@ghost
Copy link

ghost commented Aug 20, 2020

This has been released in version 2.24.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.24.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Sep 16, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Sep 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to configure security/ user authorization for an API using Azure API management API resource
5 participants