Skip to content

Can't hardcode an application key #14

@bachya

Description

@bachya

Home Assistant currently has an integration that uses the Ambient Weather REST API. In its original design, it required users to provide both an application key and an API key. Recently, when one of our users reached out to Ambient, he had this interaction:

Ambient weather does not want to provide app keys and has told me the developer of this should have hard coded the app key in to this.

I referred them to the HA documentation and the following was the response:

"Unfortunately, he is wrong. It is one app with many users, not many apps with many users. Thus, he needs to supply you with the app key unique to his application."

Although we understand the principle (the application key identifies the application and the API key identifies the user), we can't use this approach. We are an open source, GitHub-hosted project; if we hardcode an application key into our integration, it will be available for the entire world to see. Although an API key is still required to use the API, enterprising Google users could simply hunt around, find our application key, pair it with their own API key, and go to town.

Would you be willing to collaborate with us on a different authentication mechanism that accomplishes your purposes, but also adequately supports the fact that we are public and open source? Or, if a "more correct" mechanism already exists, could you point us to it?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions