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

Support multiple vaults for authorization v2 #656

Merged
merged 14 commits into from
Aug 15, 2024

Conversation

shaynafinocchiaro
Copy link
Contributor

Description

Supports multiple vault configurations during deployment with and without user certificates. Adds multiple vault unit tests and E2E scenario.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1281

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Unit tests
  • Running new E2E scenario
# ./run-e2e-test.sh --cert-csi=/usr/local/bin/cert-csi --auth-proxy 
[run-e2e-test] E2E Testing Running all test Given Test Scenarios
/root/csm/csm-operator/tests/e2e/e2e_test.go:139
  STEP: Starting: Install Authorization Proxy Server V2 With Multiple Vaults  @ 08/12/24 19:19:00.066
  STEP:      Executing  Given an environment with k8s or openshift, and CSM operator installed @ 08/12/24 19:19:00.066
  STEP:      Executing  Install Authorization CRDs [2] @ 08/12/24 19:19:00.082
  STEP:      Executing  Create [authorization-proxy-server] prerequisites from CR [1] @ 08/12/24 19:19:00.437
=== Creating Authorization Proxy Server Prerequisites ===
  STEP:      Executing  Apply custom resource [1] @ 08/12/24 19:19:02.478
  Aug 12 19:19:02.478: INFO: Running '/usr/local/bin/kubectl --namespace=authorization apply --validate=true -f -'
  Aug 12 19:19:02.743: INFO: stderr: ""
  Aug 12 19:19:02.743: INFO: stdout: "containerstoragemodule.storage.dell.com/authorization created\nconfigmap/csm-config-params created\n"
  STEP:      Executing  Validate [authorization-proxy-server] module from CR [1] is installed @ 08/12/24 19:19:02.743
  STEP:      Executing  Configure authorization-proxy-server for [powerflex] for CR [1] @ 08/12/24 19:22:42.846
=== Configuring Authorization Proxy Server ===
Address: csm-authorization.com
=== Generating Admin Token ===
=== Writing Admin Token to Tmp File ===
 
=== Creating Storage, Role, and Tenant ===
 
=== Storage, Role, and Tenant === 
 /usr/local/bin/kubectl apply -f testfiles/authorization-templates/csm-authorization-crs-powerflex.yaml
=== Generating token ===
 
=== Token ===
 /usr/local/bin/dellctl generate token --admin-token /tmp/adminToken.yaml --access-token-expiration 10m0s --refresh-token-expiration 48h --tenant csmtenant-powerflex --insecure --addr csm-authorization.com:31705
=== Applying token ===
 
=== Token Applied ===
 
  STEP:      Executing  Delete Authorization CRs for [powerflex] @ 08/12/24 19:23:18.059
  STEP:      Executing  Delete custom resource [1] @ 08/12/24 19:23:18.405
  STEP:      Executing  Delete Authorization CRDs [2] @ 08/12/24 19:23:18.422
  STEP: Ending: Install Authorization Proxy Server V2 With Multiple Vaults
   @ 08/12/24 19:23:18.699
• [263.634 seconds]
------------------------------

Ran 1 of 1 Specs in 263.703 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 5m10.433956972s
Test Suite Passed

atye
atye previously approved these changes Aug 13, 2024
alikdell
alikdell previously approved these changes Aug 14, 2024
@shaynafinocchiaro shaynafinocchiaro dismissed stale reviews from alikdell and atye via c7328d3 August 15, 2024 00:25
@shaynafinocchiaro shaynafinocchiaro force-pushed the feature-1281-multiple-vaults branch from 5e8355d to c7328d3 Compare August 15, 2024 00:25
atye
atye previously approved these changes Aug 15, 2024
@atye
Copy link
Contributor

atye commented Aug 15, 2024

https://github.com/dell/csm-operator/blob/feature-1281-multiple-vaults/samples/authorization/csm-authorization_storage.yaml

This sample needs to be updated with the new vault spec.

@shaynafinocchiaro shaynafinocchiaro merged commit 3b9e9be into main Aug 15, 2024
9 checks passed
@shaynafinocchiaro shaynafinocchiaro deleted the feature-1281-multiple-vaults branch August 15, 2024 18:47
ChristianAtDell added a commit that referenced this pull request Oct 15, 2024
* updates for multiple vaults

* update unit test samples

* add unit tests

* update storage crd

* update manifests

* use id in mount path

* fix args

* update sample

* update cert comments

* add ut for multiple vaults

* add multiple vault e2e scenario

* fix linting

* fix linting

* update storage sample

---------

Co-authored-by: Aaron Tye <tyeaaron@gmail.com>
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.

4 participants