Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package stackit-cli for openSUSE:Factory checked in at 2025-04-08 17:52:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/stackit-cli (Old) and /work/SRC/openSUSE:Factory/.stackit-cli.new.1907 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "stackit-cli" Tue Apr 8 17:52:18 2025 rev:4 rq:1267856 version:0.30.0 Changes: -------- --- /work/SRC/openSUSE:Factory/stackit-cli/stackit-cli.changes 2025-03-27 22:35:10.471742095 +0100 +++ /work/SRC/openSUSE:Factory/.stackit-cli.new.1907/stackit-cli.changes 2025-04-08 17:53:08.015281234 +0200 @@ -1,0 +2,34 @@ +Tue Apr 08 08:30:44 UTC 2025 - Johannes Kastl <opensuse_buildserv...@ojkastl.de> + +- Update to version 0.30.0: + * fix: project list command does not work with service account + (#691) + * fix(deps): update stackit sdk modules (#684) + * fix(deps): update module golang.org/x/oauth2 to v0.29.0 (#688) + * fix(deps): update module golang.org/x/text to v0.24.0 (#690) + * feat(ci): enusure docs are up-to-date for PRs (#686) + * feat(auth): Introduce possibility to use an environment + variable to authenticate (#682) + * chore: upgraded go version (#685) + * chore(observability): remove argus alias and warning in readme + (#683) + * chore(sqlserverflex): show how to get flavors in create + instance example (#679) + * fix(deps): update stackit sdk modules (#680) + * fix(deps): update kubernetes packages to v0.32.3 (#677) + * fix(deps): update module golang.org/x/oauth2 to v0.28.0 (#632) + * fix(deps): update module golang.org/x/text to v0.23.0 (#644) + * fix(deps): update module golang.org/x/mod to v0.24.0 (#642) + * fix(deps): update module golang.org/x/term to v0.30.0 (#643) + * fix(deps): update module github.com/goccy/go-yaml to v1.17.1 + (#678) + * chore(github): add issue templates (#675) + * fix(server): List also delete_on_termination (#673) + * chore(github): add pull request template (#671) + * fix(deps): update stackit sdk modules (#672) + * fix(deps): update module github.com/spf13/viper to v1.20.1 + (#665) + * chore(doc): update installation docs (#668) + * chore: update stackit logo in README.md (#670) + +------------------------------------------------------------------- Old: ---- stackit-cli-0.29.0.obscpio New: ---- stackit-cli-0.30.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ stackit-cli.spec ++++++ --- /var/tmp/diff_new_pack.KuiDk0/_old 2025-04-08 17:53:08.723310935 +0200 +++ /var/tmp/diff_new_pack.KuiDk0/_new 2025-04-08 17:53:08.723310935 +0200 @@ -19,7 +19,7 @@ %define executable_name stackit Name: stackit-cli -Version: 0.29.0 +Version: 0.30.0 Release: 0 Summary: A command-line interface to manage STACKIT resources License: Apache-2.0 @@ -29,7 +29,7 @@ BuildRequires: bash-completion BuildRequires: dos2unix BuildRequires: fish -BuildRequires: go >= 1.23 +BuildRequires: go >= 1.24 BuildRequires: zsh Provides: stackit = %{version} ++++++ _service ++++++ --- /var/tmp/diff_new_pack.KuiDk0/_old 2025-04-08 17:53:08.755312277 +0200 +++ /var/tmp/diff_new_pack.KuiDk0/_new 2025-04-08 17:53:08.759312445 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/stackitcloud/stackit-cli/</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v0.29.0</param> + <param name="revision">v0.30.0</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.KuiDk0/_old 2025-04-08 17:53:08.783313451 +0200 +++ /var/tmp/diff_new_pack.KuiDk0/_new 2025-04-08 17:53:08.783313451 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/stackitcloud/stackit-cli/</param> - <param name="changesrevision">a6439d2ba3e995c3225a1e8a38b0940e3901524a</param></service></servicedata> + <param name="changesrevision">5dcca3b726d58da53964764ecf692ba3f0c2f422</param></service></servicedata> (No newline at EOF) ++++++ stackit-cli-0.29.0.obscpio -> stackit-cli-0.30.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/.github/CODEOWNERS new/stackit-cli-0.30.0/.github/CODEOWNERS --- old/stackit-cli-0.29.0/.github/CODEOWNERS 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/.github/CODEOWNERS 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -* @marceljk @bahkauv70 @Fyusel @rubenhoenle \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/.github/actions/build/action.yaml new/stackit-cli-0.30.0/.github/actions/build/action.yaml --- old/stackit-cli-0.29.0/.github/actions/build/action.yaml 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/.github/actions/build/action.yaml 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -name: Build -description: "Build pipeline" -inputs: - go-version: - description: "Go version to install" - required: true -runs: - using: "composite" - steps: - - name: Install Go ${{ inputs.go-version }} - uses: actions/setup-go@v5 - with: - go-version: ${{ inputs.go-version }} - - name: Install project tools and dependencies - shell: bash - run: make project-tools \ No newline at end of file Binary files old/stackit-cli-0.29.0/.github/images/stackit-logo.png and new/stackit-cli-0.30.0/.github/images/stackit-logo.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/.github/renovate.json new/stackit-cli-0.30.0/.github/renovate.json --- old/stackit-cli-0.29.0/.github/renovate.json 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/.github/renovate.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:recommended"], - "prHourlyLimit": 10, - "labels": ["renovate"], - "repositories": ["stackitcloud/stackit-cli"], - "enabledManagers": ["gomod", "github-actions"], - "packageRules": [ - { - "matchSourceUrls": ["https://github.com/stackitcloud/stackit-sdk-go"], - "groupName": "STACKIT SDK modules" - } - ], - "postUpdateOptions": ["gomodTidy", "gomodUpdateImportPaths"] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/.github/workflows/ci.yaml new/stackit-cli-0.30.0/.github/workflows/ci.yaml --- old/stackit-cli-0.29.0/.github/workflows/ci.yaml 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/.github/workflows/ci.yaml 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -name: CI - -on: [pull_request, workflow_dispatch] - -env: - GO_VERSION: "1.23" - -jobs: - main: - name: CI - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build - uses: ./.github/actions/build - with: - go-version: ${{ env.GO_VERSION }} - - name: Lint - run: make lint - - name: Test - run: make test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/.github/workflows/release.yaml new/stackit-cli-0.30.0/.github/workflows/release.yaml --- old/stackit-cli-0.29.0/.github/workflows/release.yaml 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/.github/workflows/release.yaml 1970-01-01 01:00:00.000000000 +0100 @@ -1,79 +0,0 @@ -# STACKIT CLI release workflow. -name: Release - -# This GitHub action creates a release when a tag that matches one of the patterns below -# E.g. v0.1.0, v0.1.0-something.1, etc -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-*" - workflow_dispatch: - -# Releases need permissions to read and write the repository contents. -# GitHub considers creating releases and uploading assets as writing contents. -permissions: - contents: write - -jobs: - goreleaser: - name: Release - runs-on: macOS-latest - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} - # Needed to publish new packages to our S3-hosted APT repo - AWS_ACCESS_KEY_ID: ${{ secrets.OBJECT_STORAGE_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.OBJECT_STORAGE_SECRET_ACCESS_KEY }} - steps: - - uses: actions/checkout@v4 - with: - # Allow goreleaser to access older tag information. - fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version-file: "go.mod" - cache: true - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v6 - id: import_gpg - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - - name: Set up keychain - run: | - echo -n $SIGNING_CERTIFICATE_BASE64 | base64 -d -o ./ApplicationID.p12 - KEYCHAIN_PATH=$RUNNER_TEMP/ios_signing_temp.keychain-db - security create-keychain -p "${{ secrets.TEMP_KEYCHAIN }}" $KEYCHAIN_PATH - security default-keychain -s $KEYCHAIN_PATH - security unlock-keychain -p "${{ secrets.TEMP_KEYCHAIN }}" $KEYCHAIN_PATH - security import ./ApplicationID.p12 -P "${{ secrets.APPLICATION_ID }}" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH - security list-keychain -d user -s $KEYCHAIN_PATH - echo -n $AUTHKEY_BASE64 | base64 -d -o ./AuthKey.p8 - xcrun notarytool store-credentials stackit-cli -i $APPLE_ISSUER -d $APPLE_KEY_ID -k AuthKey.p8 --keychain $KEYCHAIN_PATH - rm ./ApplicationID.p12 - rm ./AuthKey.p8 - env: - APPLE_ISSUER: ${{ secrets.APPLE_ISSUER }} - APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }} - SIGNING_CERTIFICATE_BASE64: ${{ secrets.APPLICATION_ID_CERT }} - AUTHKEY_BASE64: ${{ secrets.APPLE_API_KEY }} - # aptly version 1.6.0 results in an segmentation fault. Therefore we fall back to version 1.5.0. - # Since it is not possible to specify a version via brew command a formula was added for aptly 1.5.0 - # (source: https://github.com/Homebrew/homebrew-core/pull/202415/files) - - name: Install Aptly version 1.5.0 - run: brew install aptly.rb - - name: Install Snapcraft - uses: samuelmeuli/action-snapcraft@v2 - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v6 - with: - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.CLI_RELEASE }} - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - - name: Publish packages to APT repo - if: contains(github.ref_name, '-') == false - env: - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - GPG_PRIVATE_KEY_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - run: ./scripts/publish-apt-packages.sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/.github/workflows/renovate.yaml new/stackit-cli-0.30.0/.github/workflows/renovate.yaml --- old/stackit-cli-0.29.0/.github/workflows/renovate.yaml 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/.github/workflows/renovate.yaml 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -name: Renovate - -on: - schedule: - - cron: "0 0 * * *" - workflow_dispatch: - -jobs: - renovate: - name: Renovate - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Self-hosted Renovate - uses: renovatebot/github-action@v41.0.5 - with: - configurationFile: .github/renovate.json - token: ${{ secrets.RENOVATE_TOKEN }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/.gitignore new/stackit-cli-0.30.0/.gitignore --- old/stackit-cli-0.29.0/.gitignore 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -# Binaries -bin/ -dist/ - -# IDE -.vscode -.idea - -# OS generated files -.DS_Store - -# Go workspace file -go.work -go.work.sum - -# Test coverage reports -coverage.out -coverage.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/AUTHENTICATION.md new/stackit-cli-0.30.0/AUTHENTICATION.md --- old/stackit-cli-0.29.0/AUTHENTICATION.md 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/AUTHENTICATION.md 2025-04-07 16:04:56.000000000 +0200 @@ -13,6 +13,8 @@ You can also configure the service account credentials directly in the CLI. To get help and to get a list of the available options run the command with the `-h` flag. +**_Note:_** There is an optional flag `--only-print-access-token` which can be used to only obtain the access token which prevents writing the credentials to the keyring or into `cli-auth-storage.txt` ([File Location](./README.md#configuration)). This access token can be stored as environment variable (STACKIT_ACCESS_TOKEN) in order to be used for all subsequent commands by default. + ### Overview If you don't have a service account, create one in the [STACKIT Portal](https://portal.stackit.cloud/) and assign the necessary permissions to it, e.g. `owner`. There are two ways to authenticate: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/CONTRIBUTION.md new/stackit-cli-0.30.0/CONTRIBUTION.md --- old/stackit-cli-0.29.0/CONTRIBUTION.md 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/CONTRIBUTION.md 2025-04-07 16:04:56.000000000 +0200 @@ -19,7 +19,7 @@ Prerequisites: -- [`Go`](https://go.dev/doc/install) 1.22+ +- [`Go`](https://go.dev/doc/install) 1.24+ - [`yamllint`](https://yamllint.readthedocs.io/en/stable/quickstart.html) ### Useful Make commands diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/INSTALLATION.md new/stackit-cli-0.30.0/INSTALLATION.md --- old/stackit-cli-0.29.0/INSTALLATION.md 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/INSTALLATION.md 2025-04-07 16:04:56.000000000 +0200 @@ -68,6 +68,28 @@ > If you can't install the `stackit` package due to an expired key, please go > back to step `1` to import the latest public key. +#### Nix / NixOS + +The STACKIT CLI is available as a [Nix package](https://search.nixos.org/packages?channel=unstable&show=stackit-cli), and can be used via: + +```shell +nix-shell -p stackit-cli +``` + +#### Eget + +The STACKIT CLI binaries are available via our [GitHub releases](https://github.com/stackitcloud/stackit-cli/releases), you can install them from there using [Eget](https://github.com/zyedidia/eget). + +```toml +# ~/.eget.toml +["stackitcloud/stackit-cli"] +asset_filters=["stackit-cli_", "_linux_amd64.tar.gz"] +``` + +```shell +eget stackitcloud/stackit-cli +``` + #### Any distribution Alternatively, you can install via [Homebrew](https://brew.sh/) or refer to one of the installation methods below. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/README.md new/stackit-cli-0.30.0/README.md --- old/stackit-cli-0.29.0/README.md 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/README.md 2025-04-07 16:04:56.000000000 +0200 @@ -1,6 +1,6 @@ <div align="center"> <br> -<img src=".github/images/stackit-logo.png" alt="STACKIT logo" width="50%"/> +<img src=".github/images/stackit-logo.svg" alt="STACKIT logo" width="50%"/> <br> <br> </div> @@ -23,15 +23,6 @@ Your feedback is appreciated! Feel free to open [GitHub issues](https://github.com/stackitcloud/stackit-cli) to provide feature requests and bug reports. -<a name="warning-new-stackit-idp"></a> - -> [!WARNING] -> On August 26 2024, The STACKIT Argus service was renamed to STACKIT Observability. -> -> This means that there is a new command group `observability`, which offers the same functionality as the deprecated `argus` command. -> -> Please make sure to **update your STACKIT CLI to the latest version after August 26 2024** to ensure that you start using `observability` command. - ## Installation Please refer to our [installation guide](./INSTALLATION.md) for instructions on how to install and get started using the STACKIT CLI. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/docs/stackit_auth_activate-service-account.md new/stackit-cli-0.30.0/docs/stackit_auth_activate-service-account.md --- old/stackit-cli-0.29.0/docs/stackit_auth_activate-service-account.md 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/docs/stackit_auth_activate-service-account.md 2025-04-07 16:04:56.000000000 +0200 @@ -23,12 +23,16 @@ Activate service account authentication in the STACKIT CLI using the service account token $ stackit auth activate-service-account --service-account-token my-service-account-token + + Only print the corresponding access token by using the service account token. This access token can be stored as environment variable (STACKIT_ACCESS_TOKEN) in order to be used for all subsequent commands. + $ stackit auth activate-service-account --service-account-token my-service-account-token --only-print-access-token ``` ### Options ``` -h, --help Help for "stackit auth activate-service-account" + --only-print-access-token If this is set to true the credentials are not stored in either the keyring or a file --private-key-path string RSA private key path. It takes precedence over the private key included in the service account key, if present --service-account-key-path string Service account key path --service-account-token string Service account long-lived access token diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/docs/stackit_beta_sqlserverflex_instance_create.md new/stackit-cli-0.30.0/docs/stackit_beta_sqlserverflex_instance_create.md --- old/stackit-cli-0.29.0/docs/stackit_beta_sqlserverflex_instance_create.md 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/docs/stackit_beta_sqlserverflex_instance_create.md 2025-04-07 16:04:56.000000000 +0200 @@ -16,7 +16,8 @@ Create a SQLServer Flex instance with name "my-instance" and specify flavor by CPU and RAM. Other parameters are set to default values $ stackit beta sqlserverflex instance create --name my-instance --cpu 1 --ram 4 - Create a SQLServer Flex instance with name "my-instance" and specify flavor by ID. Other parameters are set to default values + Create a SQLServer Flex instance with name "my-instance" and specify flavor by ID. Other parameters are set to default values. + The flavor ID can be retrieved by running "$ stackit beta sqlserverflex options --flavors" $ stackit beta sqlserverflex instance create --name my-instance --flavor-id xxx Create a SQLServer Flex instance with name "my-instance", specify flavor by CPU and RAM, set storage size to 20 GB, and restrict access to a specific range of IP addresses. Other parameters are set to default values diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/go.mod new/stackit-cli-0.30.0/go.mod --- old/stackit-cli-0.29.0/go.mod 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/go.mod 2025-04-07 16:04:56.000000000 +0200 @@ -1,10 +1,10 @@ module github.com/stackitcloud/stackit-cli -go 1.23 +go 1.24 require ( github.com/fatih/color v1.18.0 - github.com/goccy/go-yaml v1.16.0 + github.com/goccy/go-yaml v1.17.1 github.com/golang-jwt/jwt/v5 v5.2.2 github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 @@ -14,30 +14,30 @@ github.com/mattn/go-colorable v0.1.14 github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 - github.com/spf13/viper v1.20.0 + github.com/spf13/viper v1.20.1 github.com/stackitcloud/stackit-sdk-go/core v0.16.2 github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.1 github.com/stackitcloud/stackit-sdk-go/services/dns v0.13.1 github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.0 github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.18.1 - github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.20.1 + github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.21.0 github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.2 github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.13.1 github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.0.0 github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.2 github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.0.1 - github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.0 + github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.1 github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.6.1 github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.0.1 github.com/stackitcloud/stackit-sdk-go/services/ske v0.22.1 github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.0.1 github.com/zalando/go-keyring v0.2.6 - golang.org/x/mod v0.23.0 - golang.org/x/oauth2 v0.26.0 - golang.org/x/term v0.29.0 - golang.org/x/text v0.22.0 - k8s.io/apimachinery v0.31.3 - k8s.io/client-go v0.31.3 + golang.org/x/mod v0.24.0 + golang.org/x/oauth2 v0.29.0 + golang.org/x/term v0.30.0 + golang.org/x/text v0.24.0 + k8s.io/apimachinery v0.32.3 + k8s.io/client-go v0.32.3 ) require ( @@ -51,6 +51,7 @@ github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/x448/float16 v0.8.4 // indirect ) @@ -63,7 +64,6 @@ github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/imdario/mergo v0.3.6 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect @@ -77,21 +77,20 @@ github.com/spf13/afero v1.12.0 // indirect github.com/spf13/cast v1.7.1 // indirect github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.0.1 - github.com/stackitcloud/stackit-sdk-go/services/logme v0.21.1 - github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.21.1 + github.com/stackitcloud/stackit-sdk-go/services/logme v0.22.0 + github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.22.0 github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.1 - github.com/stackitcloud/stackit-sdk-go/services/observability v0.3.1 - github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.21.1 - github.com/stackitcloud/stackit-sdk-go/services/redis v0.21.1 + github.com/stackitcloud/stackit-sdk-go/services/observability v0.4.0 + github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.22.0 + github.com/stackitcloud/stackit-sdk-go/services/redis v0.22.0 github.com/subosito/gotenv v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/sys v0.30.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + golang.org/x/sys v0.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.31.3 // indirect + k8s.io/api v0.32.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect + sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/go.sum new/stackit-cli-0.30.0/go.sum --- old/stackit-cli-0.29.0/go.sum 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/go.sum 2025-04-07 16:04:56.000000000 +0200 @@ -20,16 +20,16 @@ github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/goccy/go-yaml v1.16.0 h1:d7m1G7A0t+logajVtklHfDYJs2Et9g3gHwdBNNFou0w= -github.com/goccy/go-yaml v1.16.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/goccy/go-yaml v1.17.1 h1:LI34wktB2xEE3ONG/2Ar54+/HJVBriAGJ55PHls4YuY= +github.com/goccy/go-yaml v1.17.1/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -50,8 +50,6 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf h1:FtEj8sfIcaaBfAKrE1Cwb61YDtYq9JxChK1c7AKce7s= @@ -87,6 +85,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -109,8 +109,8 @@ github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.20.0 h1:zrxIyR3RQIOsarIrgL8+sAvALXul9jeEPa06Y0Ph6vY= -github.com/spf13/viper v1.20.0/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= +github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4= +github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= github.com/stackitcloud/stackit-sdk-go/core v0.16.2 h1:F8A4P/LLlQSbz0S0+G3m8rb3BUOK6EcR/CKx5UQY5jQ= github.com/stackitcloud/stackit-sdk-go/core v0.16.2/go.mod h1:8KIw3czdNJ9sdil9QQimxjR6vHjeINFrRv0iZ67wfn0= github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.1 h1:2lq6SG8qOgPOx2OIA5Bca8mwRSlect3Yljk57bXqd5I= @@ -121,24 +121,24 @@ github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.0/go.mod h1:LVOYlzNt5BXDC42AHd/GZj6KvlCg4w94of/E6pZOj5k= github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.0.1 h1:4Kz9MH9VVuXYnnWFjJcPFVBiPtCUnSrHfsyUzBWwhKc= github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.0.1/go.mod h1:x0jgrL+/K2cE4BvcIQByFUf0nOPVZRqq5Z074kjjr64= -github.com/stackitcloud/stackit-sdk-go/services/logme v0.21.1 h1:LwZlY0cANz2HR6U7I6hR+kFShmTKlTPNxBp1XHDoUzE= -github.com/stackitcloud/stackit-sdk-go/services/logme v0.21.1/go.mod h1:aSdF3zcNoudRx5AzHqGVQVN7Cq05OseCQFyDa7P2cC8= -github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.21.1 h1:gAFstHEqncA6nFIrXKHrF1HDNF5jqhB1gzW/lNHAevI= -github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.21.1/go.mod h1:kUOByn2sB5KSIiz8Bx3XOLF3z7B8JtqP2nhH+Cr2W7o= +github.com/stackitcloud/stackit-sdk-go/services/logme v0.22.0 h1:5pcvoWS2sO3MIBP026OZEdImBNVvI27lksehqDMbAh0= +github.com/stackitcloud/stackit-sdk-go/services/logme v0.22.0/go.mod h1:Lb1emAS4KI+pWDXQlbmST058wTsWyD8vLmdsJpRjfEg= +github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.22.0 h1:BvEQmJwCmyAoCH5zG4apu8co/neLMtBdv9znwmbGj78= +github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.22.0/go.mod h1:3SR8YwmMiLmU8WJ8UHF0HwL7n6GZMCJYBCRll+92lYU= github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.18.1 h1:n6xMTHrLV9L78ureeigHHPwmMC4ZntOgVC+agV81Rpk= github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.18.1/go.mod h1:R+fHrtGfy+zx+d5s31cBh09P3TG58dyytb83gB7ldi0= github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.1 h1:yyN3Q4i+5bmUVySPbQC7sSKG6sK21V8AxMjvhfJe2r0= github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.1.1/go.mod h1:c5/LHxZZ7qZYOboR01qOw1Mqq5v/VNyONw7WPHctNeY= -github.com/stackitcloud/stackit-sdk-go/services/observability v0.3.1 h1:V6vvH++exqeqzD7TtzLc86ZRFrbcmxlaQqBJewiUXrE= -github.com/stackitcloud/stackit-sdk-go/services/observability v0.3.1/go.mod h1:/GFUX/OiR2/SsWh3Vsu7UnY6QLJzsbHwrcxiRBxmYOA= -github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.20.1 h1:Bag2KZMwHJhlz2iy5Sy4ANTwPSR/ArGXcF13tbC3O+M= -github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.20.1/go.mod h1:F1WyCyjAuzq3YI+YPJxj4AXrmpWXtxjFxGhwo9RIYy4= +github.com/stackitcloud/stackit-sdk-go/services/observability v0.4.0 h1:CPa/SRuX1Gl810K0SearSFyH0k/xKF9JHUV+4j+Tcn4= +github.com/stackitcloud/stackit-sdk-go/services/observability v0.4.0/go.mod h1:/go4bZ76dxGfkvl48EYUmPZ41c+64Yrf/26RodfcFyw= +github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.21.0 h1:Au07XkATgBqrGpjO5t6ASAjuif7VXcKKF3t4edRh+Yw= +github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.21.0/go.mod h1:zyVy1/etVAq6NkdPG4kNOM2R7+AxXp5zLsiN4nDC7Fs= github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.2 h1:S6uamk6ecVy8K3jE2mgU50h14GoGE0LRVmiK3TvgfTc= github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.0.2/go.mod h1:7TqfCUZRW7sjv8qOrLV5IvS6jqvY9Uxka165zdjYwD4= -github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.21.1 h1:eShKpZ+YHv1/BfgKPR6gM66oPNFh7LyMBDAztApP388= -github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.21.1/go.mod h1:Z6j5yC+5xN/+KL2q8yN9F+DZWoGPYHzTpEaPy5mfYyo= -github.com/stackitcloud/stackit-sdk-go/services/redis v0.21.1 h1:JKKAeMJAcZ2L/spwMHonmOmFFtcEuaLHRMP3wCF87jg= -github.com/stackitcloud/stackit-sdk-go/services/redis v0.21.1/go.mod h1:ZPLAvqSApWS7hzinfCVAidPuWrMxizpkVhQ3zoIt8QU= +github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.22.0 h1:/hHxcTvSQc1tG5gqRdFV3g7cMy7nU0/Av0p9UX9PyPQ= +github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.22.0/go.mod h1:HrT7p4jtiTGfGHUp4kxla+3q5z0ajUWFXZqlw5HjEf4= +github.com/stackitcloud/stackit-sdk-go/services/redis v0.22.0 h1:F+oTIOWeU5Jl0xsrJ+IV+Hz756UIOxBd7TFOD4YAv4k= +github.com/stackitcloud/stackit-sdk-go/services/redis v0.22.0/go.mod h1:bjJccrTVRTyLowME8H9oelOrBILQ6xAvh+kVRSq3SBA= github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.13.1 h1:6bl/BSVebTnK73ToRn80Mtd1sl0TowfhOninyoSQA/U= github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.13.1/go.mod h1:t7Bq7VRIN1D9C2sa2PE5gzwL6d7p1fypnsydYhKaA5k= github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.0.0 h1:tKUyddNszcif4j2yL6lJd4tDAykcU3shMkAPoM9EzV8= @@ -147,8 +147,8 @@ github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.2/go.mod h1:PrD0nNG94Dd5D9pu7HJ0bAg8ccDz6/7KaIts7K9p7as= github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.0.1 h1:qujhShugc1290NQlPoNqsembqzot8aTToAdSsJg5WrM= github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.0.1/go.mod h1:e1fsQL24gTPXcMWptuslNscawmXv/PLUAFuw+sOofbc= -github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.0 h1:a8logPoRcMCgwa9rCtuzWF6DLiuCIdJgcacZKThFsks= -github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.0/go.mod h1:zDdYYQVHGlju9cnMISX/Ty73Yh/qYcZGcJSOYWRZCbw= +github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.1 h1:oYOKoID+PMTb9qX5LyXmr7qk3VNv1qxDhZBxUZcokvM= +github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.0.1/go.mod h1:AoQFbTh8pejhIRyvpX8Jm2FHHwen8My85OYA910FIy0= github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.6.1 h1:VKgxgjsbaUVMCnntq+MLQ/c1Emn5crVr11B3gJnyHN4= github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.6.1/go.mod h1:vn6xmMRxYgEoBhYEy6i2SY2qbeDKjs4IVNdnQHcQpBc= github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.0.1 h1:7yY68QuntatwRG6ri65FlfeewACChLVbLp67wHCS8Go= @@ -178,16 +178,16 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= -golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98= +golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -195,14 +195,14 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -218,28 +218,27 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= -k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= -k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= -k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= -k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= +k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= +k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= +k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= +k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU= +k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/cmd/auth/activate-service-account/activate_service_account.go new/stackit-cli-0.30.0/internal/cmd/auth/activate-service-account/activate_service_account.go --- old/stackit-cli-0.29.0/internal/cmd/auth/activate-service-account/activate_service_account.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/cmd/auth/activate-service-account/activate_service_account.go 2025-04-07 16:04:56.000000000 +0200 @@ -22,12 +22,14 @@ serviceAccountTokenFlag = "service-account-token" serviceAccountKeyPathFlag = "service-account-key-path" privateKeyPathFlag = "private-key-path" + onlyPrintAccessTokenFlag = "only-print-access-token" // #nosec G101 ) type inputModel struct { ServiceAccountToken string ServiceAccountKeyPath string PrivateKeyPath string + OnlyPrintAccessToken bool } func NewCmd(p *print.Printer) *cobra.Command { @@ -50,13 +52,19 @@ examples.NewExample( `Activate service account authentication in the STACKIT CLI using the service account token`, "$ stackit auth activate-service-account --service-account-token my-service-account-token"), + examples.NewExample( + `Only print the corresponding access token by using the service account token. This access token can be stored as environment variable (STACKIT_ACCESS_TOKEN) in order to be used for all subsequent commands.`, + "$ stackit auth activate-service-account --service-account-token my-service-account-token --only-print-access-token", + ), ), RunE: func(cmd *cobra.Command, _ []string) error { model := parseInput(p, cmd) - tokenCustomEndpoint, err := storeFlags() - if err != nil { - return err + tokenCustomEndpoint := viper.GetString(config.TokenCustomEndpointKey) + if !model.OnlyPrintAccessToken { + if err := storeCustomEndpoint(tokenCustomEndpoint); err != nil { + return err + } } cfg := &sdkConfig.Configuration{ @@ -75,7 +83,7 @@ } // Authenticates the service account and stores credentials - email, err := auth.AuthenticateServiceAccount(p, rt) + email, accessToken, err := auth.AuthenticateServiceAccount(p, rt, model.OnlyPrintAccessToken) if err != nil { var activateServiceAccountError *cliErr.ActivateServiceAccountError if !errors.As(err, &activateServiceAccountError) { @@ -84,8 +92,12 @@ return err } - p.Info("You have been successfully authenticated to the STACKIT CLI!\nService account email: %s\n", email) - + if model.OnlyPrintAccessToken { + // Only output is the access token + p.Outputf("%s\n", accessToken) + } else { + p.Outputf("You have been successfully authenticated to the STACKIT CLI!\nService account email: %s\n", email) + } return nil }, } @@ -97,6 +109,7 @@ cmd.Flags().String(serviceAccountTokenFlag, "", "Service account long-lived access token") cmd.Flags().String(serviceAccountKeyPathFlag, "", "Service account key path") cmd.Flags().String(privateKeyPathFlag, "", "RSA private key path. It takes precedence over the private key included in the service account key, if present") + cmd.Flags().Bool(onlyPrintAccessTokenFlag, false, "If this is set to true the credentials are not stored in either the keyring or a file") } func parseInput(p *print.Printer, cmd *cobra.Command) *inputModel { @@ -104,6 +117,7 @@ ServiceAccountToken: flags.FlagToStringValue(p, cmd, serviceAccountTokenFlag), ServiceAccountKeyPath: flags.FlagToStringValue(p, cmd, serviceAccountKeyPathFlag), PrivateKeyPath: flags.FlagToStringValue(p, cmd, privateKeyPathFlag), + OnlyPrintAccessToken: flags.FlagToBoolValue(p, cmd, onlyPrintAccessTokenFlag), } if p.IsVerbosityDebug() { @@ -118,12 +132,6 @@ return &model } -func storeFlags() (tokenCustomEndpoint string, err error) { - tokenCustomEndpoint = viper.GetString(config.TokenCustomEndpointKey) - - err = auth.SetAuthField(auth.TOKEN_CUSTOM_ENDPOINT, tokenCustomEndpoint) - if err != nil { - return "", fmt.Errorf("set %s: %w", auth.TOKEN_CUSTOM_ENDPOINT, err) - } - return tokenCustomEndpoint, nil +func storeCustomEndpoint(tokenCustomEndpoint string) error { + return auth.SetAuthField(auth.TOKEN_CUSTOM_ENDPOINT, tokenCustomEndpoint) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/cmd/auth/activate-service-account/activate_service_account_test.go new/stackit-cli-0.30.0/internal/cmd/auth/activate-service-account/activate_service_account_test.go --- old/stackit-cli-0.29.0/internal/cmd/auth/activate-service-account/activate_service_account_test.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/cmd/auth/activate-service-account/activate_service_account_test.go 2025-04-07 16:04:56.000000000 +0200 @@ -20,6 +20,7 @@ serviceAccountTokenFlag: "token", serviceAccountKeyPathFlag: "sa_key", privateKeyPathFlag: "private_key", + onlyPrintAccessTokenFlag: "true", } for _, mod := range mods { mod(flagValues) @@ -32,6 +33,7 @@ ServiceAccountToken: "token", ServiceAccountKeyPath: "sa_key", PrivateKeyPath: "private_key", + OnlyPrintAccessToken: true, } for _, mod := range mods { mod(model) @@ -87,6 +89,18 @@ }), isValid: false, }, + { + description: "default value OnlyPrintAccessToken", + flagValues: fixtureFlagValues( + func(flagValues map[string]string) { + delete(flagValues, "only-print-access-token") + }, + ), + isValid: true, + expectedModel: fixtureInputModel(func(model *inputModel) { + model.OnlyPrintAccessToken = false + }), + }, } for _, tt := range tests { @@ -121,7 +135,7 @@ } } -func TestStoreFlags(t *testing.T) { +func TestStoreCustomEndpointFlags(t *testing.T) { tests := []struct { description string model *inputModel @@ -154,7 +168,7 @@ viper.Reset() viper.Set(config.TokenCustomEndpointKey, tt.tokenCustomEndpoint) - tokenCustomEndpoint, err := storeFlags() + err := storeCustomEndpoint(tt.tokenCustomEndpoint) if !tt.isValid { if err == nil { t.Fatalf("did not fail on invalid input") @@ -169,8 +183,8 @@ if err != nil { t.Errorf("Failed to get value of auth field: %v", err) } - if value != tokenCustomEndpoint { - t.Errorf("Value of \"%s\" does not match: expected \"%s\", got \"%s\"", auth.TOKEN_CUSTOM_ENDPOINT, tokenCustomEndpoint, value) + if value != tt.tokenCustomEndpoint { + t.Errorf("Value of \"%s\" does not match: expected \"%s\", got \"%s\"", auth.TOKEN_CUSTOM_ENDPOINT, tt.tokenCustomEndpoint, value) } }) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/cmd/auth/login/login.go new/stackit-cli-0.30.0/internal/cmd/auth/login/login.go --- old/stackit-cli-0.29.0/internal/cmd/auth/login/login.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/cmd/auth/login/login.go 2025-04-07 16:04:56.000000000 +0200 @@ -30,7 +30,8 @@ return fmt.Errorf("authorization failed: %w", err) } - p.Info("Successfully logged into STACKIT CLI.\n") + p.Outputln("Successfully logged into STACKIT CLI.\n") + return nil }, } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/cmd/beta/sqlserverflex/instance/create/create.go new/stackit-cli-0.30.0/internal/cmd/beta/sqlserverflex/instance/create/create.go --- old/stackit-cli-0.29.0/internal/cmd/beta/sqlserverflex/instance/create/create.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/cmd/beta/sqlserverflex/instance/create/create.go 2025-04-07 16:04:56.000000000 +0200 @@ -76,7 +76,8 @@ `Create a SQLServer Flex instance with name "my-instance" and specify flavor by CPU and RAM. Other parameters are set to default values`, `$ stackit beta sqlserverflex instance create --name my-instance --cpu 1 --ram 4`), examples.NewExample( - `Create a SQLServer Flex instance with name "my-instance" and specify flavor by ID. Other parameters are set to default values`, + `Create a SQLServer Flex instance with name "my-instance" and specify flavor by ID. Other parameters are set to default values. + The flavor ID can be retrieved by running "$ stackit beta sqlserverflex options --flavors"`, `$ stackit beta sqlserverflex instance create --name my-instance --flavor-id xxx`), examples.NewExample( `Create a SQLServer Flex instance with name "my-instance", specify flavor by CPU and RAM, set storage size to 20 GB, and restrict access to a specific range of IP addresses. Other parameters are set to default values`, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/cmd/observability/observability.go new/stackit-cli-0.30.0/internal/cmd/observability/observability.go --- old/stackit-cli-0.29.0/internal/cmd/observability/observability.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/cmd/observability/observability.go 2025-04-07 16:04:56.000000000 +0200 @@ -15,12 +15,11 @@ func NewCmd(p *print.Printer) *cobra.Command { cmd := &cobra.Command{ - Use: "observability", - Aliases: []string{"argus"}, - Short: "Provides functionality for Observability", - Long: "Provides functionality for Observability.", - Args: args.NoArgs, - Run: utils.CmdHelp, + Use: "observability", + Short: "Provides functionality for Observability", + Long: "Provides functionality for Observability.", + Args: args.NoArgs, + Run: utils.CmdHelp, } addSubcommands(cmd, p) return cmd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/cmd/project/list/list.go new/stackit-cli-0.30.0/internal/cmd/project/list/list.go --- old/stackit-cli-0.29.0/internal/cmd/project/list/list.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/cmd/project/list/list.go 2025-04-07 16:04:56.000000000 +0200 @@ -167,7 +167,7 @@ } if model.ParentId == nil && model.ProjectIdLike == nil && model.Member == nil { - email, err := auth.GetAuthField(auth.USER_EMAIL) + email, err := auth.GetAuthEmail() if err != nil { return req, fmt.Errorf("get email of authenticated user: %w", err) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/cmd/project/list/list_test.go new/stackit-cli-0.30.0/internal/cmd/project/list/list_test.go --- old/stackit-cli-0.29.0/internal/cmd/project/list/list_test.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/cmd/project/list/list_test.go 2025-04-07 16:04:56.000000000 +0200 @@ -259,7 +259,12 @@ func TestBuildRequest(t *testing.T) { keyring.MockInit() - err := auth.SetAuthField(auth.USER_EMAIL, "t...@test.com") + err := auth.SetAuthFlow(auth.AUTH_FLOW_USER_TOKEN) + if err != nil { + t.Fatalf("Failed to set auth flow: %v", err) + } + + err = auth.SetAuthField(auth.USER_EMAIL, "t...@test.com") if err != nil { t.Fatalf("Failed to set auth user email: %v", err) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/cmd/server/describe/describe.go new/stackit-cli-0.30.0/internal/cmd/server/describe/describe.go --- old/stackit-cli-0.29.0/internal/cmd/server/describe/describe.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/cmd/server/describe/describe.go 2025-04-07 16:04:56.000000000 +0200 @@ -141,6 +141,8 @@ if server.BootVolume != nil && server.BootVolume.Id != nil { table.AddRow("BOOT VOLUME", *server.BootVolume.Id) table.AddSeparator() + table.AddRow("DELETE ON TERMINATION", utils.PtrString(server.BootVolume.DeleteOnTermination)) + table.AddSeparator() } table.AddRow("POWER STATUS", utils.PtrString(server.PowerStatus)) table.AddSeparator() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/pkg/auth/auth.go new/stackit-cli-0.30.0/internal/pkg/auth/auth.go --- old/stackit-cli-0.29.0/internal/pkg/auth/auth.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/pkg/auth/auth.go 2025-04-07 16:04:56.000000000 +0200 @@ -2,6 +2,7 @@ import ( "fmt" + "os" "strconv" "time" @@ -22,7 +23,15 @@ // It returns the configuration option that can be used to create an authenticated SDK client. // // If the user was logged in and the user session expired, reauthorizeUserRoutine is called to reauthenticate the user again. +// If the environment variable STACKIT_ACCESS_TOKEN is set this token is used instead. func AuthenticationConfig(p *print.Printer, reauthorizeUserRoutine func(p *print.Printer, _ bool) error) (authCfgOption sdkConfig.ConfigurationOption, err error) { + // Get access token from env and use this if present + accessToken := os.Getenv(envAccessTokenName) + if accessToken != "" { + authCfgOption = sdkConfig.WithToken(accessToken) + return authCfgOption, nil + } + flow, err := GetAuthFlow() if err != nil { return nil, fmt.Errorf("get authentication flow: %w", err) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/pkg/auth/service_account.go new/stackit-cli-0.30.0/internal/pkg/auth/service_account.go --- old/stackit-cli-0.29.0/internal/pkg/auth/service_account.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/pkg/auth/service_account.go 2025-04-07 16:04:56.000000000 +0200 @@ -35,7 +35,8 @@ // For the key flow, it fetches an access and refresh token from the Service Account API. // For the token flow, it just stores the provided token and doesn't check if it is valid. // It returns the email associated with the service account -func AuthenticateServiceAccount(p *print.Printer, rt http.RoundTripper) (email string, err error) { +// If disableWriting is set to true the credentials are not stored on disk (keyring, file). +func AuthenticateServiceAccount(p *print.Printer, rt http.RoundTripper, disableWriting bool) (email, accessToken string, err error) { authFields := make(map[authFieldKey]string) var authFlowType AuthFlow switch flow := rt.(type) { @@ -46,12 +47,12 @@ accessToken, err := flow.GetAccessToken() if err != nil { p.Debug(print.ErrorLevel, "get access token: %v", err) - return "", &errors.ActivateServiceAccountError{} + return "", "", &errors.ActivateServiceAccountError{} } serviceAccountKey := flow.GetConfig().ServiceAccountKey saKeyBytes, err := json.Marshal(serviceAccountKey) if err != nil { - return "", fmt.Errorf("marshal service account key: %w", err) + return "", "", fmt.Errorf("marshal service account key: %w", err) } authFields[ACCESS_TOKEN] = accessToken @@ -64,12 +65,12 @@ authFields[ACCESS_TOKEN] = flow.GetConfig().ServiceAccountToken default: - return "", fmt.Errorf("could not authenticate using any of the supported authentication flows (key and token): please report this issue") + return "", "", fmt.Errorf("could not authenticate using any of the supported authentication flows (key and token): please report this issue") } email, err = getEmailFromToken(authFields[ACCESS_TOKEN]) if err != nil { - return "", fmt.Errorf("get email from access token: %w", err) + return "", "", fmt.Errorf("get email from access token: %w", err) } p.Debug(print.DebugLevel, "successfully authenticated service account %s", email) @@ -78,20 +79,22 @@ sessionExpiresAtUnix, err := getStartingSessionExpiresAtUnix() if err != nil { - return "", fmt.Errorf("compute session expiration timestamp: %w", err) + return "", "", fmt.Errorf("compute session expiration timestamp: %w", err) } authFields[SESSION_EXPIRES_AT_UNIX] = sessionExpiresAtUnix - err = SetAuthFlow(authFlowType) - if err != nil { - return "", fmt.Errorf("set auth flow type: %w", err) - } - err = SetAuthFieldMap(authFields) - if err != nil { - return "", fmt.Errorf("set in auth storage: %w", err) + if !disableWriting { + err = SetAuthFlow(authFlowType) + if err != nil { + return "", "", fmt.Errorf("set auth flow type: %w", err) + } + err = SetAuthFieldMap(authFields) + if err != nil { + return "", "", fmt.Errorf("set in auth storage: %w", err) + } } - return authFields[SERVICE_ACCOUNT_EMAIL], nil + return authFields[SERVICE_ACCOUNT_EMAIL], authFields[ACCESS_TOKEN], nil } // initKeyFlowWithStorage initializes the keyFlow from the SDK and creates a keyFlowWithStorage struct that uses that keyFlow diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/pkg/auth/service_account_test.go new/stackit-cli-0.30.0/internal/pkg/auth/service_account_test.go --- old/stackit-cli-0.29.0/internal/pkg/auth/service_account_test.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/pkg/auth/service_account_test.go 2025-04-07 16:04:56.000000000 +0200 @@ -153,7 +153,7 @@ } p := print.NewPrinter() - email, err := AuthenticateServiceAccount(p, flow) + email, _, err := AuthenticateServiceAccount(p, flow, false) if !tt.isValid { if err == nil { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/internal/pkg/auth/storage.go new/stackit-cli-0.30.0/internal/pkg/auth/storage.go --- old/stackit-cli-0.29.0/internal/pkg/auth/storage.go 2025-03-27 16:15:49.000000000 +0100 +++ new/stackit-cli-0.30.0/internal/pkg/auth/storage.go 2025-04-07 16:04:56.000000000 +0200 @@ -5,7 +5,6 @@ "encoding/json" "errors" "fmt" - "os" "path/filepath" @@ -23,8 +22,8 @@ const ( keyringService = "stackit-cli" - textFileFolderName = "stackit" textFileName = "cli-auth-storage.txt" + envAccessTokenName = "STACKIT_ACCESS_TOKEN" ) const ( @@ -341,6 +340,29 @@ return email } +// GetAuthEmail returns the email of the authenticated account. +// If the environment variable STACKIT_ACCESS_TOKEN is set, the email of this token will be returned. +func GetAuthEmail() (string, error) { + // If STACKIT_ACCESS_TOKEN is set, get the mail from the token + if accessToken := os.Getenv(envAccessTokenName); accessToken != "" { + email, err := getEmailFromToken(accessToken) + if err != nil { + return "", fmt.Errorf("error getting email from token: %w", err) + } + return email, nil + } + + profile, err := config.GetProfile() + if err != nil { + return "", fmt.Errorf("error getting profile: %w", err) + } + email := GetProfileEmail(profile) + if email == "" { + return "", fmt.Errorf("error getting profile email. email is empty") + } + return email, nil +} + func LoginUser(email, accessToken, refreshToken, sessionExpiresAtUnix string) error { authFields := map[authFieldKey]string{ SESSION_EXPIRES_AT_UNIX: sessionExpiresAtUnix, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stackit-cli-0.29.0/scripts/check-docs.sh new/stackit-cli-0.30.0/scripts/check-docs.sh --- old/stackit-cli-0.29.0/scripts/check-docs.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/stackit-cli-0.30.0/scripts/check-docs.sh 2025-04-07 16:04:56.000000000 +0200 @@ -0,0 +1,21 @@ +#!/bin/bash + +# This script is used to ensure for PRs the docs are up-to-date via the CI pipeline +# Usage: ./check-docs.sh +set -eo pipefail + +ROOT_DIR=$(git rev-parse --show-toplevel) + +before_hash=$(find docs -type f -exec sha256sum {} \; | sort | sha256sum | awk '{print $1}') + +# re-generate the docs +go run $ROOT_DIR/scripts/generate.go + +after_hash=$(find docs -type f -exec sha256sum {} \; | sort | sha256sum | awk '{print $1}') + +if [[ "$before_hash" == "$after_hash" ]]; then + echo "Docs are up-to-date" +else + echo "Changes detected. Docs are *not* up-to-date." + exit 1 +fi ++++++ stackit-cli.obsinfo ++++++ --- /var/tmp/diff_new_pack.KuiDk0/_old 2025-04-08 17:53:09.351337279 +0200 +++ /var/tmp/diff_new_pack.KuiDk0/_new 2025-04-08 17:53:09.351337279 +0200 @@ -1,5 +1,5 @@ name: stackit-cli -version: 0.29.0 -mtime: 1743088549 -commit: a6439d2ba3e995c3225a1e8a38b0940e3901524a +version: 0.30.0 +mtime: 1744034696 +commit: 5dcca3b726d58da53964764ecf692ba3f0c2f422 ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/stackit-cli/vendor.tar.gz /work/SRC/openSUSE:Factory/.stackit-cli.new.1907/vendor.tar.gz differ: char 5, line 1