Skip to content

conniey/cloud-clipboard

Repository files navigation

Cloud Clipboard

Simple application that adds text content to a clip repository and lists secret repository.

Setting up

  1. Create an Azure Key Vault.
  2. Create an Azure Blob Storage.
  3. Create a service principal
    1. Create a client secret for that service principal
    2. Set the environment variable AZURE_CLIENT_SECRET with the application secret.
    3. Set the environment variable AZURE_CLIENT_ID with the "Application (client) id".
    4. Set the environment variable AZURE_TENANT_ID with the "Directory (tenant) id".
  4. Update application.properties with service principal information.
    1. Update keyvault.endpoint with the Key Vault endpoint.
  5. Grant your service principal permissions to your Key Vault.
    1. Go to your Key Vault.
    2. Under "Settings", select "Access policies".
    3. Select "Add Access Policy".
    4. Find your service principal and add permissions for them to Get, and List secrets.
  6. Grant your service principal permissions to your Blob Storage.
    1. Go to your Blob Storage.
    2. Select "Access control (IAM)".
    3. Select "Add" -> "Add role assignment".
    4. Fill in the following fields:
      1. Role: "Storage Blob Data Owner"
      2. Assign access to: "Azure AD user, group, or service principal"
      3. Find your service principal.
  7. Open application-production.properties.
    1. Update the following properties:
      1. storage.container-name
      2. storage.endpoint
  8. Open application-oldsdk.properties
    1. Update the following properties:
      1. storage.container-name
      2. storage.account-name
      3. storage.access-key
        1. This can be found under "Settings" -> "Access keys" in your storage account.
  9. Create a container in your Azure Blob storage that matches storage.container-name.

Running application

  1. Start the application by executing: mvn spring-boot:run
  2. Open a web browser, go to http://localhost:8080

Changing profiles

Switch between profiles by updating spring.profiles.active property in application.properties.

Profile Description
dev Uses in memory clip and secret repository
production Uses Azure Blob Storage and Key Vault through the new client libraries
oldsdk Uses Azure Blob Storage and Key Vault through the old client libraries

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published