Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Superset
  3. Superset API access through Cloudron Oauth

Superset API access through Cloudron Oauth

Scheduled Pinned Locked Moved Superset
5 Posts 2 Posters 737 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Charles_Nkdl
    wrote on last edited by
    #1

    Hello Cloudron Team and users,
    Sorry to bother you again since last time. I come here for help and guidance.
    I'm currently trying to fiddle something with Superset and embedding through the Superset API in local, which is ok.
    Now that i want to try it out on my Cloudron Superset Instance i'm quite stuck, as i can't get a hold of my JWT token through the Superset API :
    https://superset.apache.org/docs/api/ => /api/v1/security/login
    Which is i think related to the fact cloudron introduced a custom security manager in the superset_config.py file

    from cloudron_security_manager import CloudronSecurityManager
    CUSTOM_SECURITY_MANAGER = CloudronSecurityManager
    
    AUTH_TYPE = AUTH_OAUTH
    AUTH_ROLE_ADMIN = 'Admin'
    AUTH_ROLE_PUBLIC = 'Public'
    AUTH_USER_REGISTRATION = True
    AUTH_USER_REGISTRATION_ROLE = "Admin"
    
    OAUTH_PROVIDERS = [
        {
            'name':'Cloudron',
            'token_key':'access_token',
            'icon':'fa-address-card',
            'remote_app': {
                'client_id': os.environ["CLOUDRON_OIDC_CLIENT_ID"],
                'client_secret': os.environ["CLOUDRON_OIDC_CLIENT_SECRET"],
                'client_kwargs': {'scope': 'openid email profile'},
                'server_metadata_url': f"{CLOUDRON_OIDC_ISSUER}/.well-known/openid-configuration",
                'api_base_url': f"{CLOUDRON_OIDC_ISSUER}/",
                'access_token_url': f"{CLOUDRON_OIDC_TOKEN_ENDPOINT}",
                'authorize_url': f"{CLOUDRON_OIDC_AUTH_ENDPOINT}"
            }
        }
    ]
    

    Now more security is ok, but i don't know how i can access the JWT token going through cloudron security first, if someone have experience about this, i'm quite sure it's supposed to be this way but i may be wrong.
    Thank you

    1 Reply Last reply
    1
    • J Offline
      J Offline
      joseph
      Staff
      wrote on last edited by
      #2

      Don't have a solution but there is a discussion about this at https://github.com/apache/superset/issues/2488

      1 Reply Last reply
      0
      • J Offline
        J Offline
        joseph
        Staff
        wrote on last edited by
        #3

        Something in https://github.com/apache/superset/discussions/20601 as well

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Charles_Nkdl
          wrote on last edited by
          #4

          Seems to be a superset problems by your expertise so ? I thought it would be related to the cloudron Security manager handling in addition to superset api...
          I'll look into it when i'm in front of the problem i guess, maybe trying to override the security part of the api like a comment in the issues

          J 1 Reply Last reply
          0
          • C Charles_Nkdl

            Seems to be a superset problems by your expertise so ? I thought it would be related to the cloudron Security manager handling in addition to superset api...
            I'll look into it when i'm in front of the problem i guess, maybe trying to override the security part of the api like a comment in the issues

            J Offline
            J Offline
            joseph
            Staff
            wrote on last edited by
            #5

            @Charles_Nkdl yeah, this is a superset related issue. The API is not working easily when using OAuth / OIDC .

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search