question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Control secrets access

See original GitHub issue

When creating an experiment we can pass secrets based on the variable environment,

  "secrets": {
    "vault": {
      "token": {
        "type": "env",
        "key": "VAULT_TOKEN_"
      },
      "address": {
        "type": "env",
        "key": "VAULT_ADDR"
      }
    }
  }

Now we should be able to access them in the controls (e.g. the control.py file I provided)

"controls": [
    {
        "name": "tracing",
        "provider": {
            "type": "python",
            "module": "my_module.control"
        }
    }
  ]

The first control that is called (i.e. configure_control)

def configure_control(
    configuration: Configuration = None,
    secrets: Secrets = None,
    settings: Settings = None,
    experiment: Experiment = None,
):

successfully converts the templates:

  "token": {
    "type": "env",
    "key": "VAULT_TOKEN_"
  },
  "address": {
    "type": "env",
    "key": "VAULT_ADDR"
  }

into real value. and I can access them via the secrets parameter.

Yet all the other controls:

  • before_experiment_control
  • after_experiment_control
  • before_hypothesis_control
  • after_hypothesis_control
  • before_method_control
  • after_method_control
  • before_rollback_control
  • after_rollback_control
  • before_activity_control
  • after_activity_control

have the secret parameter, but all of them get None value (it’s the default value - meaning no secrets was provided) how do we get secrets in other controls functions? or why we don’t get them? could not find any relevant information in the doc

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
michael-gehtman-wixcommented, Aug 24, 2020

sure, ill check it out ASAP, thank you very much.

1reaction
Lawouachcommented, Aug 21, 2020

The docs will eventually reflect whichever we go for as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Secret access control - Azure Databricks | Microsoft Learn
Access control for secrets is managed at the secret scope level. An access control list (ACL) defines a relationship between an Azure Databricks ......
Read more >
Secret access control | Databricks on AWS
Access control for secrets is managed at the secret scope level. An access control list (ACL) defines a relationship between a Databricks ...
Read more >
Authentication and access control for AWS Secrets Manager
Secrets Manager uses AWS Identity and Access Management (IAM) to secure access to secrets. IAM provides authentication and access control.
Read more >
Access control with IAM - Secret Manager - Google Cloud
Secret Manager uses Identity and Access Management (IAM) for access control. To create, manage, list, or access a secret, the appropriate IAM permissions ......
Read more >
Control: Every Hidden Location And How To Reach Them
Control has 19 hidden locations. We walk you through exactly how to find them all.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found