Граф коммитов

1371 Коммитов

Автор SHA1 Сообщение Дата
Amber Brown fde486f523
[ARO-7182] Remove square/go-jose dependency (#3965)
* update dependency to go-oidc v3, and run go mod update

* go mod vendor
2024-11-20 09:44:05 -05:00
Kipp Morris e7f68662bf
Fix AKS connectivity (#3964)
* Restore missing serverFqdn parameter

* Fix validate-go
2024-11-20 07:51:57 -05:00
Nicolas Ontiveros 0e78969cec
Merge pull request #3957 from Azure/niontive/ARO-6297
Support MSI in canary
2024-11-18 09:36:03 -08:00
Ayato Tokubi 0087b5330c
Merge pull request #3906 from Azure/jaitaiwan/ARO-11234
SDK2: Update containerservice to v6
2024-11-18 15:18:27 +00:00
Ayato Tokubi f22bef042e
SDK2: Replace old SDK in reconcile load balancer profile (#3923)
* migrate network sdk2 in loadbalancerprofile
* refactor comments
* fix "Could not find member 'Etag' on object of type 'TemplateResource'" error
2024-11-18 05:19:03 +00:00
Ayato Tokubi a0ecfcfb9a
use track2 sdk in createOrUpdateRouterIPEarly (#3919) 2024-11-18 05:18:35 +00:00
Ayato Tokubi ef15db22f7
SDK2: Replace old network SDK in ListResources Admin API (#3890)
* remove unused old routeTable client
* replace old virtual networks sdk to the new one
2024-11-18 05:18:19 +00:00
Daniel J. Holmes (jaitaiwan) a100c35a15 chore: Address PR feedback 2024-11-18 15:09:30 +10:00
Daniel J. Holmes (jaitaiwan) 7e9fb6804a chore: Remove unneeded TODOs 2024-11-18 15:09:30 +10:00
Daniel J. Holmes (jaitaiwan) ba6af03163 chore: Move to azuresdk folder 2024-11-18 15:09:30 +10:00
Daniel J. Holmes (jaitaiwan) f9ba066cd3 fix: Remove generate as we no longer need mock 2024-11-18 15:09:30 +10:00
Daniel J. Holmes (jaitaiwan) b67e845302 feat: switch to containerservice v6 2024-11-18 15:09:30 +10:00
Rajdeep Chauhan 7708100181
ARO-12034 Fix CheckAccessV2 usage for MIWI dynamic validation (#3946)
* ARO-12034 Fix CheckAccessV2 usage for MIWI dynamic validation

* ARO-12034 resolve comments and update unit tests

* ARO-12034 updated comment for validateActionsByOID

* Initialize cluster MSI clients before dynamic validation in cluster update

---------

Co-authored-by: Tanmay Satam <tsatam@redhat.com>
2024-11-15 14:43:40 -05:00
Nicolas Ontiveros faa8f0f13b Fix nsg test 2024-11-15 10:26:32 -08:00
Nicolas Ontiveros 9719391dd5 Update cluster.go 2024-11-15 10:02:20 -08:00
Nicolas Ontiveros 5d6dea5057 Add additional tenants 2024-11-15 09:11:35 -08:00
Tanmay Satam 0384e08a95 Emit version as a dimension on heartbeat metrics 2024-11-13 17:36:04 -05:00
Goutham Muguluvalli Niranjan 2a26c1d9be
update checkaccess mocks 2024-10-30 11:15:39 -05:00
Goutham Muguluvalli Niranjan 9cc5c13293
delete old remotepdp references 2024-10-30 11:15:37 -05:00
Goutham Muguluvalli Niranjan 69ca2118f6
generate checkaccess mocks 2024-10-30 11:12:54 -05:00
Goutham Muguluvalli Niranjan a0f9cbca8c
add test util to create fake token 2024-10-30 11:12:54 -05:00
Goutham Muguluvalli Niranjan b511374657
token logic to extract claims, oid, groups 2024-10-30 11:12:53 -05:00
Taylor Fahlman cf5d4b99b8
Merge pull request #3867 from Azure/yithian/ARO-10309
add an update step to replace digicert with onecert
2024-10-30 05:33:20 -07:00
Caden Marchese faf377c984
Incorporate CI and ARM feedback from azure-rest-api-specs to v2024-08-12-preview API (#3727)
* api changes

fix tag package-2023-11
this was wrong in the readme

remove UserAssignedIdentities
top level fields must not have additionalproperties

update the default tag to latest

define a new IdentityType with x-ms-enum

modelAsString on identityType x-ms-enum should be false

rename IdentityType to ResourceIdentityType to match v3/types.json

make client

add descriptions to all new API fields

make client

fix unit test that was failing as a result of removing the UserAssignedIdentity type from the API

Adjust a doc comment according to feedback

make client

* add platformworkloadidentityroleset to API definition and examples

Update client generation to account for swagger subfolder

make client

fix pwip and validatestatic unit tests

fix relative path to common-types

migrate from common-types/v3 to common-types/v6
it was requested that we use the latest version of
common types. This involves some changes to our examples
to match the UUID expected.

move from Identity to ManagedServiceIdentity type
defined in common-types/v6

use modelerfour.lenient-model-deduplication=true
avoids python client generation issues

convert PlatformWorkloadIdentity to map

ARO-4382 fix unit test cases

make generate swagger

fix unit tests

revert naming openShiftCluster.ManagedServiceIdentity to Identity

fix prod code and unit tests post-rebase, reference common-types
directly for the identity property

* more swagger CI fixes
* fix examples to contain identity and type
* remove PlatformWorkloadIdentityRoleSetUpdate

oct 16th changes

oct 17th changes

fix issues post-rebase

* update readme to contain suppression for avoidAdditionalProperties

* fix ModelValidation error by converting example IDs to resourceIDs

* Update python/go clients

* Update az aro extension to enumerate platform_workload_identities as a dict instead of a list

* Fix python linter issues

* configure suppression for PatchBodyParametersSchema

appease the linter, fix subscriptionID type in util/azureclient

appease the linter again

correct log statement, use better naming

* regenerate examples
* changes operatorName and roleDefinitionName in PWIRS_List.json

---------

Co-authored-by: Tanmay Satam <tsatam@redhat.com>
2024-10-29 14:08:36 -07:00
Alex Chvatal 798e99124e ensure certificate config is updated with the new issuer profile 2024-10-29 12:36:14 -04:00
Ayato Tokubi d89a378897
Check Role Definition for MIWI (#3876)
* bump cluster-credentials-operator

* add Get to roledefinitions client

* check script

* pipeline

* use parameters

* change target-version help message

* vendor

* fix role.go

* use candidate channel

* use operator names in RP-Config

* modify the output format

* changed to use quay.io API

* add some comments

* remove pipeline resource

* change role definition names
2024-10-24 12:35:57 -04:00
Rajdeep Singh Chauhan db03f182f5 ARO-9712 add unit test case for getCorrectErrWhenTooManyRequests 2024-10-23 12:48:22 -04:00
bennerv b1a018a12a Update role definition names and keys used 2024-10-23 09:08:38 -04:00
Rajdeep Chauhan 3b6426c8c1
Migrate Storage sdk to Track2 for allowing Managed Identity Cluster feature to disable shared access keys (#3878)
* ARO-9711 assign cluster storage blob contributor to fpsp/wimi
* ARO-9711 migrate armstorage sdk to track2
* ARO-9711-use-non-account-key-auth-for-blobs-miwi-only
* ARO-9711 update mock import to uber mocks
* ARO-9711 fix e2e error for blob access
* ARO-9711 resolve PR comments
* ARO-9711 update Blob Client naming and comments
* ARO-9711 resolved comments and removed repeated blobClient
* ARO-9711 add clientOptions to blobManager constructor
2024-10-22 15:54:06 -04:00
Hilliary Lipsig 7be474b3f7
Merge pull request #3907 from Azure/ventifus/set-correlation-id-on-outbound
Set correlation ID on outbound Azure requests
2024-10-22 09:00:55 -07:00
Ayato Tokubi 88f29dee66
SDK2: Ensure service endpoints track2 (#3885)
* subnets

* use track2 sdk in ensureServiceEndpoints

* fix test case name

* refactor TODOs
2024-10-22 14:53:23 +02:00
Andrew Denton 3d13bc2c31 Set correlation ID on outbound Azure requests if we have one. 2024-10-17 15:01:54 -07:00
Sanjana Lawande e237f01586 apply suggestions from code review 2024-10-16 11:19:01 -07:00
Kipp Morris a1029af1d1
Restore federated identity credential client mocks that were inadvertently overwritten (#3899) 2024-10-11 09:31:41 -04:00
Rajdeep Chauhan 16834d8ddd
Fix Managed Identity Cluster creation dynamic validation flow (#3891)
* Fix Dynamic Validation Flow for Workload Identity

* fix the mock msi object id export

* Remove unwanted code

* update OIDC_STORAGE_ACCOUNT_NAME local env setup

* ARO-11049 resolve comments
2024-10-10 14:12:06 -04:00
Ayato Tokubi 69378fb634
SDK2: Replace SDK to new one in util/cluster (#3884)
* add subnets.List

* remove deprecated nsg & subnets client from util/cluster

* add routetable client

* remove deprecated route tables client from util/cluster

* add virtual network peerings client

* remove deprecated virtual network peerings from util/cluster

* remove the rest usage of mgmt network sdk

* remove unused sdk wrappers
2024-10-04 13:35:30 -04:00
Kipp Morris 1a51bf4f8b
Regenerate certain mocks using source mode instead of reflect mode to (#3886)
fix issues with `make generate` on MacOS
2024-10-04 10:29:41 -07:00
Tanmay Satam f83191f35c
Populate ClientID and ObjectID of cluster and platform workload identities (#3860)
* Add new clusterIdentityIDs manager function

* Add clusterIdentityIDs step to install for WI clusters

* Add new client wrapper for armmsi UserAssignedIdentitiesClient

* Add userAssignedIdentities client to cluster manager

* Add new platformWorkloadIdentityIDs manager function

* Add platformWorkloadIdentityIDs step to install for WI clusters

* Do not allow clusterIdentityIDs to be called for a CSP cluster

* Perform all clientID/objectID enrichment before dynamic validation

* Return UserAssignedIdentitiesClient implementation instead of interface in constructor

* Use cluster MSI credentials for userAssignedIdentities client

This requires moving client instantiation from the cluster manager constructor to the
initializeClusterMsiClients install step.

* Extract ExplicitIdentity access/handling in clustermsi to common function

* Preserve passed-in casing on cluster identity resource IDs

* Actually use extracted identity from getSingleExpectedIdentity

* Clarify purpose of getSingleExplicitIdentity function

Adds a comment and unit tests indicating its usage
2024-10-03 17:10:06 -04:00
Ayato Tokubi 84816de0e4
SDK2: Remove deprecated network sdk from e2e. (#3859)
* subnets
* remove deprecated security group usage from e2e setup
* remove deprecated interface sdk from e2e.
* remove deprecated loadbalancer sdk from e2e.
* remove deprecated virtual networks sdk from e2e.
* remove deprecated subnets sdk from e2e
2024-09-27 20:44:06 +02:00
Kipp Morris 7e77b101ce
Cluster MSI follow-up (#3864)
* Generate mocks for Azure clients added in cluster MSI PR

* Add other small changes in response to previous PR feedback:

- Get subscription ID from subscription doc instead of a platform MI
- Remove an unused mock controller
2024-09-26 16:35:08 -04:00
kimorris27 7448b3db41 `make validate-go` to format stuff and make CI happy 2024-09-26 09:00:11 -05:00
kimorris27 d50158cd9c Properly generate mocks for two Azure cilents
Mocks for these interfaces were previously present, but if you remove them and make generate, they don't get replaced. I'm guessing that when they were added, the committer forgot to commit their changes to the generate.go files. This came to my attention as I was moving us over to the Uber fork because it caused errors while I was trying to get builds and unit tests working, so I codified the generation properly in this commit.
2024-09-26 09:00:11 -05:00
kimorris27 086f532624 Replace all references to the golang mock repo with references to the
Uber fork, then `go mod tidy` and `go mod vendor`

Note the change to `deps.go`
2024-09-26 09:00:11 -05:00
Kipp Morris e3cec21b73
Lay groundwork for cluster MSI usage (#3757)
* Add a parameter for enabling Entra ID RBAC on key vaults
* Add an RP-level feature flag for determining whether to use the mock MSI RP
* Tweak the mock identity URL to play nicely with the mock MSI RP
* Add Azure SDK client wrappers for new clients (federated identity credentials control plane and key vault data plane)
* Vendor in new Azure SDK clients and update msi-dataplane

* Lay groundwork for use of cluster MSI...
- Initialize the MSI dataplane client, using the mock MSI RP/stub if
  appropriate
- Initialize key vault store client (for MSI certificates; functionality
  is implemented in MSI dataplane module)
- Create a cluster MSI certificate and store it in the key vault during
  cluster bootstrap
- Instantiate an Azure SDK FederatedIdentityCredential client using the
  cluster MSI certificate
- Delete the cluster MSI certificate as needed during cluster deletion

* Don't fail during cluster deletion if the cluster MSI certificate is
already gone from the key vault (or was potentially never created)

* Establish an RP-Config variable for the MSI RP endpoint

- Update doc comment for ensureClusterMsiCertificate
- Simplify conditional logic in MSI cert deletion

* Use pointer conversion functions that aren't deprecated

* Respond to PR comments (and fix some other things along the way)

- Move `clusterMsiResourceId` function to `OpenShiftCluster` type
- When persisting the MSI cert to KV, use the `NotAfter` returned by the MSI RP (for the stub, just use an arbitrary value)
- Move `getClientOptions` functionality to `AROEnvironment` type
- Move logic for determining cluster MSI key vault name to `pkg/env`
- Pull cloud name mapping stuff out to `AROEnvironment` type
- Update msi-dataplane module to include new changes and use `UserAssignedIdentities` type to get Azure credential in `pkg/cluster/clustermsi.go`
- Fix typo in https URL in comment in `pkg/cluster/delete.go`
- Implement suggestion to use `errors.As` instead of a type assertion in `pkg/cluster/delete.go`

* Update documentation with info about new feature flag

- Move new cluster MSI steps forward in bootstrap step order
- Move MSI dataplane client options stuff to pkg/env
- Explicitly check for a single cluster MSI in `ClusterMsiResourceId`
- Other small tweaks

* Vendor in msi-dataplane update that prevents a potential nil pointer dereference

* Add missing method to internal key vault client

* Make error messages more specific in ClusterMsiResourceId

* Add missing env vars to run-rp make target and uncomment dynamic validation bootstrap step

- In newly added Azure clients, return struct types instead of interface
  types
- Move cluster MSI certificate deletion to be after Azure resource
  deletion for safety just in case cx continues to use cluster that is
  in Failed/Deleting provisioning state

* Add new env vars for MIWI to env.example for clarity/completeness

* Turn check for nonzero number of user assigned identities into a utility function

* Use existing constant for key vault dns suffix
2024-09-24 08:14:56 -04:00
Ayato Tokubi e887b35655
[ARO-4665] SDK2: remove deprecated network SDK from purge.go (#3858)
* remove deprecated security group usage from purge

* remove deprecated private link services sdk from purge.go
2024-09-24 12:28:16 +10:00
Rajdeep Chauhan 1e3f475416
ARO-4518 pass custom manifests(MIWI) to hive cluster deployment as secret (#3841)
* ARO-4518 pass custom manifests to hive cluster deployment as secret

* ARO-4518 add unit test cases
2024-09-17 10:30:45 -04:00
Rajdeep Chauhan 66f073f205
Dynamic validation for workload identity permissions and requirements (#3619)
* ARO-4376 Track2 authorization api addition for roledefinitions

* ARO-4376 add a stringutil funcs

* ARO-4376 use dbPlatformWorkloadIdentityRoleSets to get platform identity roles for cluster version

* ARO-4376 add dynamic validation for platformworkloadidentityprofile

* ARO-4376 resolve initial comments

* ARO-4376 refactor error messages and checkaccess action crosscheck

* ARO-4376 Add unit tests and comments resolution

* ARO-4376 add validation for upgradeableTo

* ARO-4376 Comment resoultion and additional unit tests

* ARO-4376 minor version comparison handling

* ARO-4376 update permission error messaging handling for MIWI

* ARO-4376 update constructors to return non-interface type

* ARO-4376 add unit tests for GroupsIntersect

* ARO-4376 update generate files to support bingo
2024-09-10 16:32:25 -04:00
Amber Brown bd9af03917
Only perform machineconfig reconciliation during OpenShift upgrades (#3473) 2024-09-10 18:24:46 +10:00
Amber Brown 44bc3cc724
[MIMO] Move cluster certificate functionality to ClientHelper (#3736)
* move over TLS applying, as well as some clienthelper work
2024-09-05 15:44:46 +10:00
Amber Brown c554e98391
Drop some unneccessary dependencies by moving to `bingo` for tooling (#3719)
* Move to using bingo for tools
* go mod vendor
2024-09-05 15:29:19 +10:00