#Using Secrets for Refresh_Token and Access_Token in config.yml
1 messages · Page 1 of 1 (latest)
You can press the "Close Post" button above or type /close at any time to close this post.
Anything to do here?
Well, ya....I'm not really sure a meta.log is related to this issue though
what issue?
I wrote a long message and I guess it got deleted because I did not include a meta.log. Give me a second and I'll try to explain
Kometa Secrets is great for allowing a user to share their entire config.yml while concealing API keys and such.
But some credentials, specifically Refresh_Token and Access_Token are temporary and expire/refresh at intervals. When they do refresh, Kometa overwrites the Kometa Secrets variables in the config.yml file with the new true credential values
The following was shared by @iron blade and was automatically redacted by Luma as it may have contained sensitive information.
If you feel this message should not have been redacted, resend it with !noredact in your message to avoid redaction.
trakt:
client_id: (redacted by Luma)
client_secret: (redacted by Luma)
authorization:
access_token: (redacted by Luma)
token_type: Bearer
expires_in: 7889238
refresh_token: (redacted by Luma)
scope: public
created_at: 1723463021
pin:
So for example......here....Trakt access_token and refresh_token......those actual values are referenced in my docker compose.....but those values have expiration dates and kometa/trakt will have to refresh them after some time. When it does...it overwrites these kometa secret variables in my config.yml. That isn't good.
Have you experienced this behavior or are familiar with it?
The following was shared by @iron blade and was automatically redacted by Luma as it may have contained sensitive information.
If you feel this message should not have been redacted, resend it with !noredact in your message to avoid redaction.
haha...your bot autmatically concealed the kometa secret variables...they weren't true values. They were just:
access_token: (redacted by Luma)
ok, I'll stop trying to write that, sorry
That's what I would expect to happen. Everything besides the three top-level values are maintained and updated by Kometa in the config.yml. There's no provision for writing them off in some arbitrary location.
So then how can I easily publically share my entire config.yml in a systematic approach without leaking my access_token and refresh_token?
what do you mean by the "Three top-level values"? Sorry, which are those?
client_id, client_secret, pin
Don't share your active config with secrets in place. Share a template.
In short, it seems kometa secrets variable feature is only useful for static values........
That is true. I don't see a practical way to make it work for ephemeral values since there's no fixed place to update such things.
One potential solution/feature_request that would allow for more robust secrets concealment - A separate "secrets.yml" which the config.yml calls/references
Sure. there's a feature request for that I believe.
Is that something anyone has considered?
I have files in my kometa directory linked to a github repo. It makes it extremely easy to share my ENTIRE setup. Config, image files, custom this, custom that. The whole thing.
I of course am not sharing the docker compose file which holds my credentials...but this whole approach allows me to easily show what my setup is for others interested
And github is nice just for version tracking and such as well...revert if problem, etc
I would probably have a template config and not check in the active config.yml.
but also....having a clean config.yml is something I would think would be nice for the Kometa dev team as well.....no more needing bots monitoring all our messages and deleting them when we expose creds. There would be no creds to expose in a config.yml if you have a separate secrets.yml
Hmmmm......I need to look into the template config function you are referencing. That sounds like it might be a solution for me
You're saying I could have a separate template.yml or some kind in my config.yml that references these credentials/secrets?
Ah, I misunderstood. I think I understand now.
You're referring to managing two separate config.yml files now instead of just one.......ehhhh
So when I make a change to my config, I have to make that change twice - Once to my active config and again to my public "template" config
that's a job for a script.
Mmmmm.....yes, I agree
Alright alright. While I do think the secrets.yml is an excellent feature request, I now see an altnerate option I can pursue. Thanks for discussing this with me
people dont even need to share config.ymls with us
the log contains this
and then the bot recreates the config