This message was deleted.
# infisical-feedback
s
This message was deleted.
t
Hey @Janaka Abeywardhana ! So basically you’d want to have the ability to re-generate the same token in case you lose / forget it etc.?
👋🏾 1
We’re working on a new token at the moment actually but I’m not sure about token regeneration yet - this may be possible but we’d need to do more security review to get the full implications
j
I wanted to manually set a local env var wth the token before running a infra deploy script which passes this value through to the container run. What I faced yest: I was deploying an update to our app hosting infra on Azure. Currently, this is an Arm template triggered by a shell script which handles binding Arm template params. There's one per deployed instance (stage and prod). This script get re-run when infra changes including a change like the container image name changing or registry changing. The Infisical token is Arm template param but not saved in the script. The current process is to set that as a env var locally where the deploy script is being run. The script dynamically binds it to the Arm template param.
infiscal run
is inside the container.
Being able to view/copy the token isn't unusual. Honeycomb do it for example. In-place regen is a workaround for my use case. In any case don't focus as much on my suggested solutions. Hopefully the above gives you more context to solve elegantly.
oh right now, I'm depending on my terminal history and the fact that there are only two Infisical tokens I've set. At some point that's going to be lost. Then it looks like the only option I have is to delete the token and create a new one. I want to keep the same token name.
Maybe I'm missing a trick here. let me know if I am pls.
If there's a way to reference a token by name and pull the value in a script, that could be more ideal. I didn't spot a way to do that using the CLI? don't want to write code for this at the moment.
CLI
service -token
command refs says "create, view, and delete". That's an docs error right?
view
is not available.
t
@Maidul Islam can comment on this
👍🏾 1
j
More development on this... recap of need: securely pass in secrets required by IaC. At the moment that's INFISICAL_TOKEN used to inject app secrets into the container and CONTAINER_REGISTRY_PASSWORD used by the PaaS to pull the image from a private container repo. My IaC looks for those ^ env vars (currently shell scripts wrapping Azure CLI commands that apply ARM templates). I have a script per deployment instance checked into a git repo (instance name + region + environment e.g. docq uksouth stage). Initially, I was manually setting those two ^ env vars before running the script. Back to the original question in the thread, to set the correct env var for a give deployment required identifying the correct Infisical service token. Also process of having to manual set each time is a pain and communicating all this to the team is also a pain. crazy idea: why not save the infisical service tokens in Infisical and inject using the Infisical CLI 😁 so in this iteration I've tagged secrets as
app
or
infra
. Then use tags to control when secrets are injected. Apprears to work although I only did a quick test and have not applied filtering injecting into the app yet. This approach might breakdown with a CI/CD pipeline for infra deployment (gitops). But in theory we'd create a Infiscal token for the automation with the right scopes. thinking out loud: Using tags probably isn't the most secure option available. Using scopes will enable locking down the Infisical token used by the infra to inject into the app just to app secrets. This is only important if there are secrets outside the app scope that need locking down which I don't need to at the moment. Tell me if this is crazy, what do you all think about this approach in general? thoughts on tags vs scopes (paths)?
fwiw - I think there's still value in token regeneration and being able to view a token and prefix the token itself with the token name. All make operations easier. These are not mutually exclusive with my approach above.
what's holding me back from moving to using folders rather than tags for the above is the lack of a easy way to move/copy secrets into a folder. Looks like I'll have to manually recreate 12 secrets x 3 environments sadpepe Along those lines, it would be awesome to be able to 1) tag multiple secrets in a single operation 2) view tags right on the grid or explore screens
v
what’s holding me back from moving to using folders rather than tags for the above is the lack of a easy way to move/copy secrets into a folder.
this will be improved significantly soon 🤫
🎉 2