Aazam Thakur
10/31/2023, 4:08 AMkapa.ai
10/31/2023, 4:08 AMSECRET_STORE_GCP_PROJECT_ID environment variable to the GCP project to which the credentials have access and secrets will be located. 3. In the Worker and Server applications, set the SECRET_STORE_GCP_CREDENTIALS environment variable to the JSON key created in step 1. 4. In the Worker and Server applications, set the SECRET_PERSISTENCE environment variable to GOOGLE_SECRET_MANAGER. Please note that this process is not reversible. Once you have converted to a secret store, you won’t be able to reverse it. For more details, you can refer to the [Airbyte Security documentation](https://docs.airbyte.com/operator-guides/security).Aazam Thakur
10/31/2023, 4:10 AMkapa.ai
10/31/2023, 4:12 AMdocker build . -t airbyte/destination-<name>:dev or docker build . -t airbyte/source-python-http-example:dev depending on whether you're building a source or destination connector ([source](https://docs.airbyte.com/connector-development/tutorials/building-a-python-destination), [source](https://docs.airbyte.com/connector-development/tutorials/cdk-tutorial-python-http/use-connector-in-airbyte)). As for managing credentials, Airbyte provides a few options. You can use Google Secret Manager to store credentials ([source](https://docs.airbyte.com/operator-guides/security)), or you can use the secret management feature to avoid storing credentials in the YAML files ([source](https://docs.airbyte.com/cli-documentation)). You can also mount the inputs into the Docker container to allow the connector to access your secrets without having to build them into the container ([source](https://docs.airbyte.com/connector-development/tutorials/build-a-connector-the-hard-way)). However, these extracts do not provide specific information on how to use Bitwarden secrets manager CLI with Airbyte or which Docker file you should be modifying. For more detailed guidance, you may want to refer to the [Airbyte documentation](https://docs.airbyte.com/) or ask for help in the [Airbyte community](https://airbytehq.slack.com).Aazam Thakur
10/31/2023, 4:28 AMkapa.ai
10/31/2023, 4:28 AMkapa.ai
10/31/2023, 4:30 AMRUN commands to your Dockerfile to retrieve the secrets. Here's an example of how you might do this: dockerfile # Use an existing docker image as a base FROM airbyte/integration-base-python:0.1.0 # Install any needed packages specified in requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Get secrets from Bitwarden RUN SECRET_1=$(bws secret get fc3a93f4-2a16-445b-b0c4-aeaf0102f0ff --access-token $BWS_ACCESS_TOKEN | jq '.value') RUN SECRET_2=$(bws secret get 80b55c29-5cc8-42eb-a898-acfd01232bbb --access-token $BWS_ACCESS_TOKEN | jq '.value') # Copy the rest of your connector's code COPY . . 2. Prepare your env file Replace the relevant hardcoded values in your settings.env file with the designated variable names (SECRET_1 and SECRET_2): env # Database # Available providers are sqlserver, postgresql, mysql/mariadb, or sqlite BW_DB_PROVIDER=mysql BW_DB_SERVER=db BW_DB_DATABASE=bitwarden_vault BW_DB_USERNAME=$SECRET_1 BW_DB_PASSWORD=$SECRET_2 3. Run the container Start up your Docker container and specify the access token to use with bws login as an environment variable: bash docker run -e BWS_ACCESS_TOKEN=<your-access-token> docker-unified When this command is run, your Docker container will start up and inject your database credentials from the values retrieved by the container. Please note that this is a general guide and might not work out of the box for your specific use case. You might need to adjust the commands based on your specific connector and setup. For more detailed guidance, you may want to refer to the [Airbyte documentation](https://docs.airbyte.com/) or ask for help in the [Airbyte community](https://airbytehq.slack.com).