question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow adding integration with master token alone

See original GitHub issue

I think it would be a useful option to allow the user to specify a master_token instead of the account username and app password as is suggested as best security practice in the glocaltokens readme. Having to store my Google account credentials on the home assistant server is the main thing keeping me from using this extension so any way around that is appreciated, this was just what I came up with to maybe achieve that.

_Originally posted by @coleya in https://github.com/leikoilja/ha-google-home/issues/124#issuecomment-921531375_

Related https://github.com/leikoilja/glocaltokens/issues/168

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Drakulixcommented, Sep 17, 2021

Let’s also hear from @KapJI and @Drakulix, maybe they have some thoughts on security and better practises 😃

Honestly, I think securely storing this information is a problem, that the home-assistant core has to solve. Many integrations including official ones do store sensitive secrets in there and there is no good way to encrypt them as an integration, that is not easily circumvented. Of course this is not an easy problem for the core to solve as well, but systems like home-assistant OS could at least offer disk-encryption? Anyway, in my opinion this is way out of our reach.

Was there any research onto getting other authentification flows to work? Obviously we would like to have a normal web-based authentification flow with a limited set of scopes. gmusicapi had a similar problem and stuck with the master_token approach, although simon-weber found a way to a web-based auth flow. The problem is just, that the token is stored in a cookie and not easy to extract.

I am not sure, if that approach even allows to limit scopes, but if we find any more secure solution, we should maybe write a tutorial and additionally offer people to sign in with a token instead. That way they can generate and extract a more secure one, instead of relying on our more convenient login procedure.

1reaction
DurgNomis-drolcommented, Sep 17, 2021

I think encrypting any data is meaningless because it should be decrypted by HA, and the decryption key must be stored somewhere where HA can access it. If someone has access to these files you’re pwned in any case, it doesn’t matter if they’re encrypted or not.

This is as far as I understand, also the reasoning behind why HA does not encrypt in the first place, which makes totally sense BTW.

And @Drakulix reply answered what i was gonna say 😆

But the cookie thing sounds interesting.

We can still support master token as an auth method, thou i dont think it’s a common use case and it’s not going to make it easier to authenticate or use the integration.

👍 from me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Authentication and User Agent
When you run a master without a configuration file, the Allow All identity provider is used by default, which allows any non-empty user...
Read more >
Enabling an Existing Application to Use Token-based ...
In some cases, you might have an existing application that is not set up for token-based authentication. For example, an integration record might...
Read more >
Allow Saved Access Tokens
After you configure Tableau Server for OAuth, you can decide to allow users to manage their own OAuth credentials, or you want to...
Read more >
Chapter 13. Configuring authentication and user agent
Enabling Container Provider Integration ... Creating Service Accounts and Authentication Tokens for the Red Hat Registry ... Master and Node Configuration
Read more >
What the Heck is OAuth?
The Client application sends an access token request to the token endpoint on the Authorization Server with confidential client credentials and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found