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

Make translation scripts safer #6918

Closed
ma2ciek opened this issue Mar 2, 2017 · 7 comments · Fixed by ckeditor/ckeditor5-dev#124
Closed

Make translation scripts safer #6918

ma2ciek opened this issue Mar 2, 2017 · 7 comments · Fixed by ckeditor/ckeditor5-dev#124
Assignees
Labels
package:dev type:improvement This issue reports a possible enhancement of an existing feature.
Milestone

Comments

@ma2ciek
Copy link
Contributor

ma2ciek commented Mar 2, 2017

Translation scripts require safer login and password providing than writing them directly into the scripts params, e.g.:

 gulp traslations:download -u username -p password

I think that https://github.com/flatiron/prompt package could fit this issue very well.

@ma2ciek ma2ciek self-assigned this Mar 2, 2017
@pomek
Copy link
Member

pomek commented Mar 2, 2017

Try to avoid providing the secret data directly in the console. You shouldn't write any password or token in the CLI because it will be stored in your bash history.

In the release tool, in order to create a release on Github, we require a Github Token. In the first version of the script, the token was passed directly from the console. In the second version, I used a package which allows providing the secret data without saving it in history.

This function will be helpful - https://github.com/ckeditor/ckeditor5-dev/blob/master/packages/ckeditor5-dev-env/lib/release-tools/utils/cli.js#L79-L91.

@ma2ciek
Copy link
Contributor Author

ma2ciek commented Mar 2, 2017

Thanks @pomek.

Try to avoid providing the secret data directly in the console. You shouldn't write any password or token in the CLI because it will be stored in your bash history.

Does it apply to the console prompts as well?

@ma2ciek
Copy link
Contributor Author

ma2ciek commented Mar 2, 2017

With prompt package I don't see the logs in my ~/.bash_history, but I'm not quite sure about the safety of this solution. With the prompt package the changes are rather cosmetic, they're already on the t/92 branch. I'll move for sure to the inquirer package to do not duplicate packages.

@pomek
Copy link
Member

pomek commented Mar 3, 2017

Does it apply to the console prompts as well?

Nope.

I'll move for sure to the inquirer package to do not duplicate packages.

Sounds good.

@fredck
Copy link
Contributor

fredck commented Mar 3, 2017

Hopefully a better authentication solution can be found, like a certificate. Having to provide a password is problematic and it doesn't allow for easy automation of such scripts. If we would have a cron task that daily updates language files, we would have to store the password as plaintext somewhere and this is not good.

@Reinmar
Copy link
Member

Reinmar commented Mar 3, 2017

From what @ma2ciek said there's no other method :(

@ma2ciek
Copy link
Contributor Author

ma2ciek commented Mar 3, 2017

Actually that has changed few weaks ago (https://fr.transifex.com/blog/2017/api-authentication-tokens/) and It's already in the API https://docs.transifex.com/api/introduction#authentication, so I'll look at it and will try to align it to our scripts.

Reinmar referenced this issue in ckeditor/ckeditor5-dev Mar 14, 2017
Fix: Made the translation tasks more secure by not requiring to provide your password through bash. Closes #92.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-dev May 18, 2020
@mlewand mlewand added this to the iteration 9 milestone May 18, 2020
@mlewand mlewand added type:improvement This issue reports a possible enhancement of an existing feature. package:dev labels May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:dev type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants