Skip to content

Discuss: Security regression #273

Closed
Closed

Description

@coleaeason

Problem

We have made a recent effort to prevent any access to authTokens from the JS console because it makes XSS for account takeovers trivially simple. However, Ion stores all authentication data in localStorage instead of cookies, this means it is all available from the JS Console now.

Can we move back to using cookies? Why are we required to store auth data in local storage?

Activity

  1. tgolen commented on Aug 20, 2020

    @tgolen
    Contributor

    Yeah, there are a few security concerns here past just cookies/localStorage. For example, the partner password being in the front-end code.

    When it comes to the cookies, I kind of forget all that we've gone through in relation to this, so forgive me if this is going in circles...

    Isn't it just as easy to access cookie data with JS as it is to access localStorage?

    When you say "let's move back to using cookies", what do you mean exactly?

    Something to keep in mind when it comes to a solution here is that whatever we use, it has to be cross-platform, so while I don't think we can use "cookies" in the web sense, maybe we can find a solution that is cookie-like?

  2. coleaeason commented on Aug 20, 2020

    @coleaeason
    ContributorAuthor

    Isn't it just as easy to access cookie data with JS as it is to access localStorage?

    if the cookie set to HTTPonly it's non accessible from JS

    When you say "let's move back to using cookies", what do you mean exactly?

    Something to keep in mind when it comes to a solution here is that whatever we use, it has to be cross-platform, so while I don't think we can use "cookies" in the web sense, maybe we can find a solution that is cookie-like?

    Yeah that's interesting, I'm not sure what a cookie like solution looks like for cross platform. I forgot the mobile apps can't use cookies in the same sense (desktop too I assume). Might need to do some digging on different ways to store secure data for cross platform applications like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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