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

Improve credentials management #209

Open
tfardet opened this issue Aug 10, 2024 · 4 comments
Open

Improve credentials management #209

tfardet opened this issue Aug 10, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@tfardet
Copy link
Collaborator

tfardet commented Aug 10, 2024

To improve the security of the credentials, I would like to move from the csv in the home folder to a chmod-600 file in the config folder.
I would also like to move from "key+secret" to "token only" because :

  1. only the token is actually necessary
  2. if your token is compromised, you can regenerate one from your key+secret
  3. it's only one entry instead of two to deal with
  4. it let's us remove some code

@hadrilec would that be OK with you?
If so, for the 2nd part, could you add an insee_token secret entry corresponding to the token associated to the current key and secret for the tests?

@tfardet tfardet added the enhancement New feature or request label Aug 10, 2024
@hadrilec
Copy link
Contributor

hi thanks, if key and secret are no longer stored locally it means that the token should be manually set again by the user whenever it expires. I dont recall what is the maximum validity period of the token I will check. good to improve the security but I would like to avoid putting more burden on the user.

@tfardet
Copy link
Collaborator Author

tfardet commented Aug 12, 2024

maximum validity period is one year, as far as I can tell.
There is indeed that drawback for storing only the token, if you think it's too much of an issue, I can live with keeping things only as they would be with #210

@hadrilec
Copy link
Contributor

ok, the whole point of the init_conn function is not to ask the user to deal with the token at all. Credentials are used to prevent someone from overloading insee's API, you have access to public data and not to confidential data so it is not a big deal if it is done in a way which does not match state of the art security standards.

@tfardet
Copy link
Collaborator Author

tfardet commented Aug 12, 2024

Alright, let's stick with #210 then, I'll wait for your review on that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants