https://supertokens.com/ logo
Docs
Join the conversationJoin Discord
Channels
community
contributing
general
github-activity
info
introductions
new-releases
random
security
support-questions
welcome-0xdelusion
welcome-aj-ya
welcome-aleksandrc
welcome-alpinjs
welcome-amberlamps1
welcome-andrew-rodriguez
welcome-ankit-choudhary
welcome-anthony-stod-custodio
welcome-call-in
welcome-chwalbox
welcome-claybiokiller
welcome-co7e
welcome-cosmoecwsa
welcome-devdag
welcome-dinso
welcome-drebotelho
welcome-elio
welcome-ernest
welcome-foxbarrington
welcome-fromscratch
welcome-galto4ir
welcome-goetzum
welcome-hay-kot
welcome-himanshu-kukreja
welcome-hossambarakat
welcome-ichikawakazuto
welcome-jahir9991
welcome-jamesl
welcome-jerry123424
welcome-john-oliver
welcome-jonas-alexanderson
welcome-jxyz
welcome-kelvinwop
welcome-kraz
welcome-lancekey
welcome-leoo
welcome-lukeacollins
welcome-m-j-mon
welcome-malik-khoja
welcome-marco
welcome-mardadi
welcome-meshguy
welcome-metamorph
welcome-mike-tectu
welcome-mirzok
welcome-mozomig
welcome-naberyou66_
welcome-nacer
welcome-namratha
welcome-naveenkumar
welcome-nightlight
welcome-nischith
welcome-notankit
welcome-olawumi
welcome-pavan-kumar-reddy-n
welcome-pineappaul
welcome-poothebear
welcome-rick
welcome-samuel-qosenergy
welcome-samuelstroschein
welcome-shubhamgoel23
welcome-shubhamkaushal
welcome-sidebar
welcome-surajsli
welcome-suyash_
welcome-syntaxerror
welcome-tauno
welcome-tauno
welcome-tawnoz
welcome-teclali
welcome-tls
welcome-turbosepp
welcome-vikram_shadow
welcome-yann
Powered by Linen
general
  • l

    LucaCastelnuovo

    07/14/2020, 1:12 PM
    A safe client device?, and an safe server device?
  • u

    user

    07/14/2020, 1:13 PM
    unless you are writing both pieces, in general, just worry about your side, assuming the server offers mTLS
  • l

    LucaCastelnuovo

    07/14/2020, 1:14 PM
    I'm writing the frontend and backend code, is that what you mean?
  • u

    user

    07/14/2020, 1:14 PM
    yeah
  • u

    user

    07/14/2020, 1:14 PM
    look into mTLS
  • u

    user

    07/14/2020, 1:14 PM
    that would be my first suggestion
  • l

    LucaCastelnuovo

    07/14/2020, 1:15 PM
    "mTLS is just an extension of TLS (Transport Layer Security). This is commonly found in verifying endpoints and for encrypting communications and for TLS specifically, browsers. The ‘HTTPS’ in a URL is the evidence for this." Does this mean if I have
    HTTPS
    I have
    mTLS
  • u

    user

    07/14/2020, 1:16 PM
    no, that's TLS one direction, mTLS is TLS both directions
  • l

    LucaCastelnuovo

    07/14/2020, 1:16 PM
    This is my oneway setup currently for all subdomains: https://www.ssllabs.com/ssltest/analyze.html?d=test.lucacastelnuovo.nl
  • l

    LucaCastelnuovo

    07/14/2020, 1:17 PM
    Oh like this https://smallstep.com/hello-mtls/doc/client/axios
  • u

    user

    07/14/2020, 1:17 PM
    That's certainly one way.
  • u

    user

    07/14/2020, 1:18 PM
    if the data in intercepted by your MITM, then it can't decrypt it because it's been encrypted with second set of keys.
  • l

    LucaCastelnuovo

    07/14/2020, 1:19 PM
    Cool, if I implemented this I wouldn't need this bandaid, semi-fix right? > 1. Client: Before sending data to the server, Axios middleware will request
    https://server.com/auth/key
    > 2. Server: Generate keypair (maybe 2048bits if performance allows it) > 3. Server: Encrypt
    privateKey
    with
    applicationKey
    (set in .env) > 4. Server: Store
    encryptedPrivateKey
    in DB with an random
    keyId
    > 5. Server: Return
    publicKey
    and
    keyId
    to Client > 6. Client: The middleware will then encrypt the original payload with this
    publicKey
    and also provide the
    keyId
    > 7. Client: Sends request > 8. Server: Looks up
    keyId
    in DB and gets
    encryptedPrivateKey
    > 9. Server: Decrypts
    encryptedPrivateKey
    and gets
    privateKey
    > 10. Server: Decrypts request > 11. Server: Handles request
  • u

    user

    07/14/2020, 1:19 PM
    yeah, but that bandaid, actually doesn't do anything, because if TLS is vulnerable then so is that code
  • l

    LucaCastelnuovo

    07/14/2020, 1:19 PM
    shame right 🙂
  • u

    user

    07/14/2020, 1:20 PM
    it happens
  • l

    LucaCastelnuovo

    07/14/2020, 1:21 PM
    tableau did have this kind of system in place for some time, what would be the reason for this?
  • u

    user

    07/14/2020, 1:22 PM
    poor security practices?
  • u

    user

    07/14/2020, 1:22 PM
    although it's possible that they were running inside a corporate firewall
  • l

    LucaCastelnuovo

    07/14/2020, 1:22 PM
    Sure, I thought maybe they had some nextlevel bigbrain developers
  • u

    user

    07/14/2020, 1:22 PM
    and not using DNS with TLS
  • u

    user

    07/14/2020, 1:23 PM
    like if you want to go to tableau running inside your company go to
    tmetrics/
  • u

    user

    07/14/2020, 1:23 PM
    rather than
    https://tmetrics.companyname.com
  • u

    user

    07/14/2020, 1:23 PM
    and so TLS doesn't work there
  • u

    user

    07/14/2020, 1:23 PM
    so it's possible that they created that to implement TLS when it didn't already exist
  • l

    LucaCastelnuovo

    07/14/2020, 1:24 PM
    That makes sense
  • l

    LucaCastelnuovo

    07/14/2020, 8:04 PM
    Hi everybody, it's me again. Today I was trying to start implementing the basics of supertokens (my work so far https://github.com/Luca-Castelnuovo/Secure/tree/master/client)
  • l

    LucaCastelnuovo

    07/14/2020, 8:04 PM
    I've set the url to the demo server
    js
    SuperTokensRequest.init(
            'https://try.supertokens.io',
            440,
            'example.com',
            {}
        );
  • l

    LucaCastelnuovo

    07/14/2020, 8:05 PM
    and created the following function
    js
    const isLoggedin = () => SuperTokensRequest.doesSessionExist();
    https://github.com/Luca-Castelnuovo/Secure/blob/master/client/src/services/Auth.js
  • r

    rp

    07/14/2020, 8:05 PM
    the first param to the init function is your refresh API. On your domain.
Powered by Linen
Title
r

rp

07/14/2020, 8:05 PM
the first param to the init function is your refresh API. On your domain.
View count: 2