mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 23:21:08 +02:00
* Update README Let contributors know that docs will now be located in UDR * Add comments to each mdx doc Comment has been added to all mdx docs that are not partials * chore: added changelog changelog check failure * wip: removed changelog * Fix content errors * Doc spacing * Update website/content/docs/deploy/kubernetes/vso/helm.mdx Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com> --------- Co-authored-by: jonathanfrappier <92055993+jonathanfrappier@users.noreply.github.com> Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
64 lines
2.7 KiB
Plaintext
64 lines
2.7 KiB
Plaintext
---
|
|
layout: docs
|
|
page_title: hcp connect - Command
|
|
description: |-
|
|
Use "hcp connect" command to authenticate users and machines to HCP with explicit
|
|
credentials or an HCP token and interactive browser login.
|
|
---
|
|
|
|
> [!IMPORTANT]
|
|
> **Documentation Update:** Product documentation, which were located in this repository under `/website`, are now located in [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs), colocated with all other product documentation. Contributions to this content should be done in the `web-unified-docs` repo, and not this one. Changes made to `/website` content in this repo will not be reflected on the developer.hashicorp.com website.
|
|
|
|
# hcp connect
|
|
|
|
The `hcp connect` command authenticates users and machines to HCP with explicit
|
|
credentials or an HCP token and interactive browser login.
|
|
|
|
By default, the `hcp connect` command uses interactive authentication that requires
|
|
users to log into the HashiCorp Cloud Platform with a browser.
|
|
|
|
Non-interactive login requires a service principal credential that was
|
|
previously generated through the HCP portal. The service principal must have
|
|
access to the requested organization, project, and HCP Vault Dedicated cluster.
|
|
|
|
If authentication succeeds, the Vault CLI saves the returned HCP token and HCP
|
|
Vault address in the local cache.
|
|
|
|
## Examples
|
|
|
|
Connect to HCP interactively:
|
|
|
|
```shell-session
|
|
$ vault hcp connect
|
|
The default web browser has been opened at <auth_url>. Please continue the login in the web browser.
|
|
Success!
|
|
```
|
|
|
|
## Usage
|
|
|
|
The following flags are available in addition to the [standard set of
|
|
flags](/vault/docs/commands) included on all commands.
|
|
|
|
### Command options
|
|
|
|
- `-client-id` `(string: "")` - Client ID belonging to a service principal
|
|
credential generated in the HCP Portal. **Required for non-interactive
|
|
authentication**.
|
|
|
|
- `-secret-id` `(string: "")` - Secret ID belonging to a service principal
|
|
credential previously generated in the HCP Portal. **Required for
|
|
non-interactive authentication**.
|
|
|
|
- `-organization-id` `(string: "")` - Optional ID of the desired HCP
|
|
organization. If `organization-id` is empty and the user is associated with
|
|
multiple HCP organizations, the CLI prompts the user to select from a list
|
|
of available organizations.
|
|
|
|
- `-project-id` `(string: "")` - Optional ID of the desired HCP project. If
|
|
`project-id` is empty and the user is associated with more than one HCP
|
|
project, the CLI prompts the user to select from a list of available projects.
|
|
|
|
- `-cluster-id` `(string: "")` - Optional ID of the desired HCP Vault Dedicated cluster.
|
|
If `cluster-id` is empty and the user is associated with multiple HCP clusters,
|
|
the CLI prompts the user to select from a list of available clusters.
|