Giter Site home page Giter Site logo

Comments (8)

Bulga-xD avatar Bulga-xD commented on May 17, 2024 1

@leranjun Keep in mind that Swagger is just documentation of your application nothing more, Swagger is just so simple front-end application for your backend application where you can visualize your endpoints. There is no "Swagger Api". Regarding the documentation, I will try soon as possible to add one on how it works. Also, we manage to create awesome integration with the URM application(User Rights Management). Where we are getting the authentication from Azure via this project and after that, we are sending the token to the URM. In this way, we are able to check which user have permission for specific endpoints (Permissions from centralized application)

from fastapi-azure-auth.

leranjun avatar leranjun commented on May 17, 2024 1

Gotcha, super helpful! I think I'll need to dig a bit deeper into what I actually want to achieve. Thank you both for the comments.

from fastapi-azure-auth.

JonasKs avatar JonasKs commented on May 17, 2024 1

I'll close this for now. Please don't hesitate re-opening or creating a new issue if you have more questions, @leranjun

from fastapi-azure-auth.

JonasKs avatar JonasKs commented on May 17, 2024

Unfortunately the documentation for B2C is lacking. @kristiqntashev added tests and support - would you be up to document Azure setup too? Or you, @leranjun if you made it work?

As for APIs to be restricted, you should use roles in Azure. There's docs on how to do that here.

from fastapi-azure-auth.

leranjun avatar leranjun commented on May 17, 2024

Thanks for the reply! Is it possible for only the Swagger docs to be restricted, though? Or does it only apply to main API routes? I don't seem to see a dependency configuration for docs.

from fastapi-azure-auth.

JonasKs avatar JonasKs commented on May 17, 2024

Swagger is just a client to call your APIs, there's no "swagger API" and "normal API". So if I interpret your question correctly, and you want to hide swagger docs behind authentication, then no, that's not possible (and would be security by obscurity, which is pretty useless). Your APIs should have authentication, and swagger is just a client that can call your APIs, and help you fetch a valid token.

from fastapi-azure-auth.

JonasKs avatar JonasKs commented on May 17, 2024

Of course you can always host a custom swagger, or customize the one fastapi generates, but there's no security in that.

See https://fastapi.tiangolo.com/advanced/extending-openapi/.

from fastapi-azure-auth.

JonasKs avatar JonasKs commented on May 17, 2024

@kristiqntashev that sounds awesome! Let me know if you need any help with docs! 😊

from fastapi-azure-auth.

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.