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

Secure token value #98

Open
groupsky opened this issue Jul 9, 2015 · 7 comments
Open

Secure token value #98

groupsky opened this issue Jul 9, 2015 · 7 comments

Comments

@groupsky
Copy link
Contributor

groupsky commented Jul 9, 2015

Currently bug reports generated from atom contain the token and gist repo. There should be some form of protection of the token so bug reports don't expose it. Additionally it would be preferable if other plugins don't have access to the token.

One way is to generate a random key and encrypt the token with that, the key itself could be stored as a plugin state - which I haven't investigated how secure is.

Another way is to store it in another location like custom config file in atom's config directory.

So far both approaches require building a custom UI to manage the token.

@jerone
Copy link
Contributor

jerone commented Jul 9, 2015

I looked the other day at another package called gist, which uses another file for storing the GitHub Gist token.

I prefer to see Atom supplying use with a more secure option... atom/atom#1763

@jerone jerone added this to the vNext milestone Jul 10, 2015
@jerone
Copy link
Contributor

jerone commented Jul 27, 2015

A few guys on Slacks suggested to use https://github.com/atom/node-keytar

@groupsky
Copy link
Contributor Author

This sounds interesting. And still will require a dedicated UI for managing the token. IMHO this will be tied with #100

@jerone
Copy link
Contributor

jerone commented Jul 29, 2015

@jerone commented on 27 jul. 2015 19:05 CEST:

A few guys on Slacks suggested to use https://github.com/atom/node-keytar

Hmm just tried installing it at work (Windows 8.1) but fails to install. Will try tonight at home.

@jerone
Copy link
Contributor

jerone commented Jul 30, 2015

So at home it won't install either (Windows 7) 😞

It seems the package was used by Atom at one point but dropped with no replacement.

Gives me a bad taste.


Continuing search for another solution...

@jerone
Copy link
Contributor

jerone commented Aug 1, 2015

So I've been thinking about this...

We can't fix this with a good security model. Problem is that everything we do, other packages can read or write too. Besides that, everything is accessible through the developer tools. This makes providing a real secure model not possible. Encrypting the tokens doesn't really makes sense and is easily reverse-engineered.
Without Atom providing a way to securely storing credentials only accessible by our package, I wouldn't pursue a security model for now.

Going back to the original issue of not exposing the token when creating automatic error messages on GitHub through Atom error notifications, I think that moving the token credentials to another location/file would be the best solution.

I propose we make an CSON file called sync.token in Atom root (~/atom) where we can store credentials. Thinking about the feature; if in the future we want to support more sources (:bulb: ? ), we could define a namespace with Gist as first release. Something like:

gist:
  token: 1234567890
  id: 1234567890

Pushing to next milestone.

@jerone jerone modified the milestones: v0.6.0, v0.7.0 Aug 1, 2015
@dirk-thomas dirk-thomas removed this from the v0.7.0 milestone Mar 5, 2016
@UziTech
Copy link
Member

UziTech commented Feb 9, 2020

token can be set in the environment variable GITHUB_TOKEN and gist id can be set in GIST_ID

We should probably show that on the settings page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants