Requirements
Before you can create a 1Password Secrets Automation workflow as a Connect server, make sure you complete the prerequisite tasks. The tasks vary depending on how you plan to deploy.- Docker
- Kubernetes
- Sign up for a 1Password account.
- Create a vault for the Connect server to access. Connect servers can’t access your built-in Personal, Private, or Employee vault, or your default Shared vault.
- Make sure you belong to a group with permission to manage Secrets Automation.
- Make sure you have a deployment environment for Docker. You can use a cloud service provider or your local machine.
Deployment
Use the following instructions to deploy a 1Password Connect Server.Step 1: Create a Secrets Automation workflow
You can create a Connect server Secrets Automation workflow through the 1Password.com dashboard or 1Password CLI. Following these instructions creates:- A
1password-credentials.jsonfile. It contains the credentials necessary to deploy 1Password Connect Server. - An access token. Use this in your applications or services to authenticate with the Connect REST API. You can issue additional tokens later.
- 1Password.com
- 1Password CLI
- Sign in to your account on 1Password.com.
- Open the Secrets Automation workflow creation wizard.
Or, navigate to Developer > Directory, select Other under Infrastructure Secrets Management, then select Create a Connect server. - Follow the onscreen instructions to create a Secrets Automation environment, set up your first access token, and deploy a Connect server. Make sure to save your credentials file and token in 1Password.
Step 2: Deploy a 1Password Connect Server
- Docker
- Kubernetes
To deploy a Connect server using a Docker Compose file, you’ll need to start two Docker images:
- 1password/connect-api serves the Connect server REST API.
- 1password/connect-sync keeps the information available on the Connect server in sync with 1Password.com.
If you aren’t familiar with Docker or Docker Compose, refer to the Docker Compose documentation for more information.
- Make sure you have Docker and Docker Compose on your machine.
-
Create a Docker Compose file to deploy the 1Password Connect Server containers in the directory where you saved your
1password-credentials.jsonfile. You can also use the exampledocker-compose.yamlfile. If the credentials file is in the other directory, update thevolumessection to point to the correct credentials file location. -
Make sure Docker is running. You can check if the Docker daemon is running with the
docker infocommand in a terminal application. -
Start the Docker containers with Docker Compose. Run the following command in the directory with the
docker-compose.yamlfile.By default, you can access the Connect REST API through port8080on the local host. Refer to the 1Password Connect server API reference for more information.
Test the Connect server REST API
You can make sure the Connect server REST API is accessible using acurl command, one of the 1Password Connect server API endpoints, and the token you created.-
Export the Connect server access token as an environment variable. This is the same token you created in Step 1. Alternatively, you can replace
$OP_API_TOKENwith the token string in thecurlrequest. -
Use the following example
curlcommand to list the vaults connected to the Connect server.
docker compose down.Step 3: Set up applications and services to get information from 1Password
Applications and services get information from 1Password through REST API requests to a Connect server. The requests are authenticated with an access token. Create a new token for each application or service you use.
If your language or platform isn’t listed, you can build your own client using the 1Password Connect Server REST API.
You can also use 1Password CLI with your Connect server to provision secrets and retrieve item information on the command line.