Skip to content

Conversation

@rna-afk
Copy link
Contributor

@rna-afk rna-afk commented Aug 22, 2022

Adding the option for the users to authenticate using client
certificates instead of client secrets if they want. The certs
field is already in the osServicePrincipal.json and has to be set
for Azure SDK authentication. Terraform expects two extra fields
to be set for authentication and is added here.

@openshift-ci openshift-ci bot requested review from jhixson74 and m1kola August 22, 2022 16:13
@rna-afk
Copy link
Contributor Author

rna-afk commented Aug 22, 2022

/test unit
/test e2e-azure
/test e2e-azure-resourcegroup
/test gofmt
/test golint
/test govet

@patrickdillon
Copy link
Contributor

This looks great. A couple of questions/notes:

  1. How is the cert passed in ~/.azure/osServicePrincipal.json: is it just the path or are the cert contents in the file?
  2. We need to figure out the story for the cluster secret. The CCO does not support a cluster secret with a cert. So perhaps the best we can do is skip creating the cluster secret when authenticating with a certificate.

@2uasimojo @akhil-rane @abutcher @jharrington22 @wking have all been discussing how to handle setting the cluster secret and it will require some fiddling with manifests.

I have been trying to think of a way that the installer could authenticate with certs and still write the client secret without it being too hacky:

Perhaps we allow environment-variable based authentication for authenticating the installer/terraform with a cert and then continue to pass the cluster secret in ~/.azure/osServicePrincipal.json. What do you think of that idea?

@rna-afk rna-afk force-pushed the azure-client-certs-auth branch 2 times, most recently from 4f7465d to d20a37a Compare August 23, 2022 18:21
@rna-afk
Copy link
Contributor Author

rna-afk commented Aug 24, 2022

/test golint
/test govet
/test unit
/test e2e-azure

@rna-afk rna-afk force-pushed the azure-client-certs-auth branch 2 times, most recently from dadbbf8 to bfc2c3f Compare August 24, 2022 16:33
@rna-afk
Copy link
Contributor Author

rna-afk commented Aug 24, 2022

/test golint
/test gofmt
/test unit
/test images
/test shellcheck
/test e2e-azure
/test tf-fmt
/test verify-vendor
/test verify-codegen

@rna-afk rna-afk force-pushed the azure-client-certs-auth branch 2 times, most recently from f24e2b4 to 880bca6 Compare August 25, 2022 13:27
@rna-afk
Copy link
Contributor Author

rna-afk commented Aug 25, 2022

/test e2e-azure

@rna-afk rna-afk force-pushed the azure-client-certs-auth branch 3 times, most recently from d46834f to cd12187 Compare August 25, 2022 19:12
Copy link

@s-amann s-amann left a comment

Choose a reason for hiding this comment

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

please see comment regarding duplicate code, and my one open question.

@rna-afk rna-afk force-pushed the azure-client-certs-auth branch 2 times, most recently from 67769b6 to 5c9a27a Compare August 26, 2022 14:10
Copy link
Contributor

@jharrington22 jharrington22 left a comment

Choose a reason for hiding this comment

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

@rna-afk thanks for this, I had some folks review this that are closer to the authorizer work in the ARO RP and they have a few comments that we should address before merging cc/ @patrickdillon

@rna-afk rna-afk force-pushed the azure-client-certs-auth branch 2 times, most recently from bac4441 to 1626f9d Compare August 26, 2022 15:09
@patrickdillon
Copy link
Contributor

@2uasimojo @akhil-rane @jharrington22

Because we can't create a cluster secret from a cert, we have added validation to enforce that this can only be run with manual mode:
352697f#diff-13678451d1af92fb770a62f31468daf0ca9e946ac5c707692c131a059c6ee767R95-R97

My understanding here is that this will only prevent the installer from laying down a cluster secret, users should still be able to edit manifests to provide a secret and set the CCO to the desired mode (i.e. I do not think this validatoin enforces the CCO to run in manual mode).

This seems like the simplest approach. I am still open to the idea of allowing both sets of creds to be supplied directly to the installer, but this seems like the simplest solution ATM.

@rna-afk
Copy link
Contributor Author

rna-afk commented Aug 26, 2022

/retest-required

1 similar comment
@rna-afk
Copy link
Contributor Author

rna-afk commented Aug 26, 2022

/retest-required

@rna-afk
Copy link
Contributor Author

rna-afk commented Aug 29, 2022

/retest

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 8, 2022
@rna-afk rna-afk force-pushed the azure-client-certs-auth branch from 1626f9d to 26a6917 Compare September 8, 2022 13:56
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 8, 2022
@rna-afk rna-afk force-pushed the azure-client-certs-auth branch from 26a6917 to 449c561 Compare September 12, 2022 15:15
@rna-afk
Copy link
Contributor Author

rna-afk commented Sep 12, 2022

/test e2e-azure

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 12, 2022

@rna-afk: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test aro-unit
  • /test e2e-aws-ovn
  • /test e2e-aws-ovn-upi
  • /test e2e-azure-ovn
  • /test e2e-azure-ovn-upi
  • /test e2e-gcp-ovn
  • /test e2e-gcp-ovn-upi
  • /test e2e-metal-ipi-ovn-ipv6
  • /test e2e-vsphere-ovn
  • /test e2e-vsphere-upi
  • /test gofmt
  • /test golint
  • /test govet
  • /test images
  • /test okd-images
  • /test okd-unit
  • /test okd-verify-codegen
  • /test openstack-manifests
  • /test shellcheck
  • /test tf-lint
  • /test unit
  • /test verify-codegen
  • /test verify-vendor
  • /test yaml-lint

The following commands are available to trigger optional jobs:

  • /test e2e-alibaba
  • /test e2e-aws-disruptive
  • /test e2e-aws-ovn-fips
  • /test e2e-aws-ovn-imdsv2
  • /test e2e-aws-ovn-proxy
  • /test e2e-aws-ovn-shared-vpc
  • /test e2e-aws-ovn-single-node
  • /test e2e-aws-upgrade
  • /test e2e-aws-upi-proxy
  • /test e2e-aws-workers-rhel8
  • /test e2e-azure-ovn-resourcegroup
  • /test e2e-azure-ovn-shared-vpc
  • /test e2e-azurestack
  • /test e2e-azurestack-upi
  • /test e2e-crc
  • /test e2e-gcp-ovn-shared-vpc
  • /test e2e-gcp-upgrade
  • /test e2e-gcp-upi-xpn
  • /test e2e-ibmcloud-ovn
  • /test e2e-libvirt
  • /test e2e-metal-assisted
  • /test e2e-metal-ipi
  • /test e2e-metal-ipi-ovn-dualstack
  • /test e2e-metal-ipi-swapped-hosts
  • /test e2e-metal-ipi-virtualmedia
  • /test e2e-metal-single-node-live-iso
  • /test e2e-nutanix
  • /test e2e-openstack
  • /test e2e-openstack-kuryr
  • /test e2e-openstack-parallel
  • /test e2e-openstack-proxy
  • /test e2e-openstack-upi
  • /test e2e-ovirt
  • /test e2e-vsphere-zones
  • /test okd-e2e-aws-ovn
  • /test okd-e2e-aws-upgrade
  • /test okd-e2e-gcp
  • /test okd-e2e-gcp-ovn-upgrade
  • /test okd-e2e-vsphere
  • /test tf-fmt

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-installer-master-aro-unit
  • pull-ci-openshift-installer-master-e2e-aws-ovn
  • pull-ci-openshift-installer-master-e2e-azure-ovn
  • pull-ci-openshift-installer-master-e2e-azure-ovn-resourcegroup
  • pull-ci-openshift-installer-master-e2e-azure-ovn-shared-vpc
  • pull-ci-openshift-installer-master-e2e-azurestack
  • pull-ci-openshift-installer-master-e2e-gcp-ovn
  • pull-ci-openshift-installer-master-e2e-ibmcloud-ovn
  • pull-ci-openshift-installer-master-e2e-libvirt
  • pull-ci-openshift-installer-master-e2e-metal-assisted
  • pull-ci-openshift-installer-master-e2e-metal-ipi
  • pull-ci-openshift-installer-master-e2e-openstack
  • pull-ci-openshift-installer-master-e2e-ovirt
  • pull-ci-openshift-installer-master-e2e-vsphere-ovn
  • pull-ci-openshift-installer-master-gofmt
  • pull-ci-openshift-installer-master-golint
  • pull-ci-openshift-installer-master-govet
  • pull-ci-openshift-installer-master-images
  • pull-ci-openshift-installer-master-okd-e2e-aws-ovn
  • pull-ci-openshift-installer-master-okd-e2e-gcp-ovn-upgrade
  • pull-ci-openshift-installer-master-okd-images
  • pull-ci-openshift-installer-master-okd-unit
  • pull-ci-openshift-installer-master-okd-verify-codegen
  • pull-ci-openshift-installer-master-shellcheck
  • pull-ci-openshift-installer-master-tf-fmt
  • pull-ci-openshift-installer-master-tf-lint
  • pull-ci-openshift-installer-master-unit
  • pull-ci-openshift-installer-master-verify-codegen
  • pull-ci-openshift-installer-master-verify-vendor
  • pull-ci-openshift-installer-master-yaml-lint
Details

In response to this:

/test e2e-azure

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rna-afk
Copy link
Contributor Author

rna-afk commented Sep 12, 2022

/test e2e-azure-ovn
/test e2e-azure-ovn-resourcegroup
/test e2e-azure-ovn-shared-vpc
/test images

@rna-afk
Copy link
Contributor Author

rna-afk commented Sep 13, 2022

/test images
/test e2e-azure-ovn
/test e2e-azure-ovn-resourcegroup
/test e2e-azure-ovn-shared-vpc

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 13, 2022
Adding the option for the users to authenticate using client
certificates instead of client secrets if they want. The certs
field is already in the osServicePrincipal.json and has to be set
for Azure SDK authentication. Terraform expects two extra fields
to be set for authentication and is added here.
@rna-afk rna-afk force-pushed the azure-client-certs-auth branch from dde171f to 2363e67 Compare September 13, 2022 14:00
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 13, 2022
@rna-afk rna-afk force-pushed the azure-client-certs-auth branch from 2363e67 to fdd8b67 Compare September 13, 2022 15:58
There was a bug in the certs authorizer that was fixed in the
Azure/auth v0.5.1. Updating the library version.
@rna-afk rna-afk force-pushed the azure-client-certs-auth branch from fdd8b67 to ca66e04 Compare September 13, 2022 16:24
@patrickdillon
Copy link
Contributor

/lgtm
/approve
/skip

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 14, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 14, 2022
@patrickdillon
Copy link
Contributor

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 503e900 and 2 for PR HEAD ca66e04 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD e2ec1e2 and 1 for PR HEAD ca66e04 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 14, 2022

@rna-afk: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-vsphere 26a6917 link true /test e2e-vsphere
ci/prow/e2e-aws 26a6917 link true /test e2e-aws
ci/prow/e2e-azure-shared-vpc 26a6917 link false /test e2e-azure-shared-vpc
ci/prow/e2e-ibmcloud 26a6917 link false /test e2e-ibmcloud
ci/prow/e2e-azure-ovn-resourcegroup ca66e04 link false /test e2e-azure-ovn-resourcegroup
ci/prow/e2e-libvirt ca66e04 link false /test e2e-libvirt
ci/prow/okd-e2e-gcp-ovn-upgrade ca66e04 link false /test okd-e2e-gcp-ovn-upgrade
ci/prow/e2e-ibmcloud-ovn ca66e04 link false /test e2e-ibmcloud-ovn
ci/prow/e2e-metal-assisted ca66e04 link false /test e2e-metal-assisted
ci/prow/okd-e2e-aws-ovn ca66e04 link false /test okd-e2e-aws-ovn
ci/prow/e2e-azurestack ca66e04 link false /test e2e-azurestack
ci/prow/e2e-azure-ovn-shared-vpc ca66e04 link false /test e2e-azure-ovn-shared-vpc

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants