Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide capability to configure SAS tokens via raw value or environment variable & don't log raw configuration #531

Merged
merged 3 commits into from
Apr 29, 2019

Conversation

tomkerkhove
Copy link
Owner

@tomkerkhove tomkerkhove commented Apr 29, 2019

  • Provide capability to configure SAS tokens via raw value or environment variable
  • Don't log raw configuration to leak configured raw SAS token

Relates to #530 & #514

Metrics Configuration example

metrics:
  - name: demo_azurestoragequeue_queue_size
    description: "Approximate amount of messages in 'orders' queue (determined with StorageQueue provider)"
    resourceType: StorageQueue
    accountName: promitor
    queueName: orders
    sasToken:
      rawValue: "?sv=<redacted>"
    azureMetricConfiguration:
      metricName: MessageCount
      aggregation:
        type: Total
  - name: demo_azurestoragequeue_queue_timespentinqueue
    description: "Approximate amount of time that the oldest message has been in 'orders' queue (determined with StorageQueue provider)"
    resourceType: StorageQueue
    accountName: promitor
    queueName: orders
    sasToken:
      environmentVariable: SECRETS_STORAGEQUEUE_SAS
    azureMetricConfiguration:
      metricName: TimeSpentInQueue
      aggregation:
        type: Total

@promitor-bot
Copy link

Docker image for this PR was built and is available on Docker Hub.

You can pull it locally via the CLI:

docker pull tomkerkhove/promitor-agent-scraper-ci:pr531

Want to verify the new version? Run it locally:

docker run -d -p 8999:80 --name promitor-agent-scraper-pr531 \
                         --env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
                         --env-file C:/Promitor/az-mon-auth.creds\
                         --volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
                         tomkerkhove/promitor-agent-scraper-ci:pr531

@tomkerkhove tomkerkhove merged commit ed46796 into master Apr 29, 2019
@tomkerkhove tomkerkhove deleted the features-storage-sas-env-variable branch April 29, 2019 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants