GithubHelp home page GithubHelp logo

Comments (3)

rpattcorner avatar rpattcorner commented on July 19, 2024 1

Thanks @ottokruse . Yes, the two parameters with JSON for cookie names and corresponding contents would solve the entire class of bootstrapping problem and maybe a few I haven't run into. Would all the lambdas need to be modified to set and propagate the custom cookie(s), or is there one particular Lambda that would be enough to pull the cookie thru to the SPA/Web App?

Wish I could do this now -- and hope you or others keep it in mind the next time the appropriate lambda(s?) come up for modification. It would go a long way towards making the framework (needs a name!) a generalized solution for SPA protection.

from cloudfront-authorization-at-edge.

ottokruse avatar ottokruse commented on July 19, 2024

Hi @rpattcorner ,

perhaps they are a way to set behavioural metadata on already-defined cookies, and defining a new cookie would require modifying (all?) the lambdas to recognize and propagate the cookie end to end.

Yes

Is there a way to pass custom values into cookies all the way through the framework to the SPA that I'm just not seeing?

Can't think of a way

... that would be a terrific feature,

Yes, good idea.

General solution might be:

  • Add 2 new parameters to the CF stack template:
    • "AdditionalCookieName" --> name of the additional cookie
    • "AdditionalCookieData" --> value of the additional cookie (put JSON in there if you want)
  • In the Lambda@Edge code, read the "AdditionalCookieData" value and set it in a cookie with the name as specified by "AdditionalCookieName"

That would help you right? Thoughts?

from cloudfront-authorization-at-edge.

ottokruse avatar ottokruse commented on July 19, 2024

Wish I could do this now -- and hope you or others keep it in mind the next time the appropriate lambda(s?) come up for modification. It would go a long way towards making the framework (needs a name!) a generalized solution for SPA protecti

Should be there now! Part of #75

Let me know how that works! Closing this issue for now

needs a name!

Any suggestions? I use "Auth@Edge" but I am too deep into this solution and can use an outside view

from cloudfront-authorization-at-edge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.