Giter Site home page Giter Site logo

how to secure operating api about functions HOT 6 CLOSED

imacks avatar imacks commented on May 29, 2024
how to secure operating api

from functions.

Comments (6)

c0ze avatar c0ze commented on May 29, 2024

Unfortunately, there is no concept of users or fine grained access control. You can secure global API by issuing JWT tokens, please check the Authentication docs for more information. For fine grain control, you can set route level JWT tokens, and distribute to your users maybe.

from functions.

imacks avatar imacks commented on May 29, 2024

good to know. to have access control to /v1/apps (deploying and updating apps), what kind of middleware will i need to write? is there a guide somewhere?

from functions.

c0ze avatar c0ze commented on May 29, 2024

You don't need to write any middleware. You just need to pass an ENV when starting the functions server. You also need to pass the same token when you are issuing commands via the fn tool (or accessing the API in any way). Please check the documentation I provided before.

If you need to modify the implementation (write your own middleware etc), please check the following PRs, they may give you ideas. Thank you !

#662
#660

from functions.

imacks avatar imacks commented on May 29, 2024

hmm i can't find the name of the env...help pls?

for my use case, i would really need a per-user jwt token as described before. Is this already on your roadmap? I would certainly like to help on this feature if you think it's a good idea.

from functions.

c0ze avatar c0ze commented on May 29, 2024

does this help ?

As for users, I am afraid that is not in the roadmap. If you are willing to help though, of course we would appreciate your input !

from functions.

imacks avatar imacks commented on May 29, 2024

tks that certainly helps. I'll try to implement users then...

from functions.

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.