Giter VIP home page Giter VIP logo

boxyhq / jackson Goto Github PK

View Code? Open in Web Editor NEW
1.6K 11.0 142.0 46.83 MB

๐Ÿ”ฅ Streamline your web application's authentication with Jackson, an SSO service supporting SAML and OpenID Connect protocols. Beyond enterprise-grade Single Sign-On, it also supports Directory Sync via the SCIM 2.0 protocol for automatic user and group provisioning/de-provisioning. ๐Ÿคฉ

Home Page: https://boxyhq.com/docs/jackson/overview

License: Apache License 2.0

Dockerfile 0.19% JavaScript 1.25% TypeScript 96.11% CSS 0.23% Procfile 0.01% MDX 2.12% Shell 0.09%
enterprise-software saml saml2 saml-service-provider saml-authentication sso sso-authentication oidc openid openid-connect

jackson's People

Contributors

deepakprabhakara avatar dependabot[bot] avatar devkiran avatar frantic-rabbit avatar g3root avatar gitstart-boxyhq avatar nathantarbert avatar ndreas avatar niwsa avatar ryukemeister avatar schalkneethling avatar sergio-toro avatar sulavghimiree avatar ukrocks007 avatar vanshbhardwaj24 avatar vishalboxyhq avatar waveywaves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jackson's Issues

Code Exchange: A token is created even if a wrong tenant/product is passed to the request.

curl --request POST \
  --url 'http://localhost:5000/oauth/token' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data 'grant_type=authorization_code' \
  --data 'client_id=<a invalid tenant and product combination>' \
  --data 'client_secret=<some value>' \
  --data 'redirect_uri=<redirect URL>' \
  --data 'code=<code from the query parameter above>'

Issue Summary

The token creation method doesn't evaluate the tenant and product is valid or not. It validates only the code at the moment.

"SAML configuration not found." when using 'preLoadedConfig'

Issue Summary

Got the error "SAML configuration not found." when initiating the SAML request. Note, I'm using the pre-loaded SAML config options.

Steps to Reproduce

  1. Created a new express app
  2. Added the express routes as per the doc
  3. Pre-loaded one Idp metadata (Create 2 files abc.js and abc.xml)
  4. Added the correct pre-loaded config path (I can confirm Jackson could access the file)
  5. Visited the following URL

http://localhost:3000/sso/oauth/authorize?response_type=code&provider=saml&client_id=abc&redirect_uri=http://localhost:3000/sso/oauth/completed&state=1234

Notes

I think oauth.authorize() method is not considering the preLoadedConfig

IdP Config : support delete operation

Is your proposal related to a problem?

Currently, there is no way to delete an IdP config once it is saved in jackson.

Describe the solution you'd like

Expose a deleteConfig function in the API controller and use it in jackson/jackson-next services.

Create a software bill of materials (SBOM) for the project

Is your proposal related to a problem?

With the growing vulnerabilities in the software supply chain (like log4j) it makes a lot of sense to add an SBOM to our project.

Describe the solution you'd like

Describe alternatives you've considered

n/a

Additional context

n/a

Use a standard HTTP response for the jackson service

Currently we send the response payload back as either json or plaintext. It would be better to standardise the format into JSON with defined structure for error and data. Eg:-
Error

{
 "status": 400 
 "error": {
  msg: "Please provide a defaultRedirectUrl" , 
  description: "Jackson needs the URL to complete the IdP flow"
 }
}

Success

{
"status": 200
"data": {
      client_id: clientID,
      client_secret: clientSecret,
      provider: idpMetadata.provider,
  }
}

Provide a metadata file which will ease configuration with Identity Providers

Is your proposal related to a problem?

Some IdPs allow the uploading of a metadata file that will help populate all the fields when creating a SAML app.

Describe the solution you'd like

We should provide this metadata file with all the required fields at an endpoint so that the user can point their customers to it. This will ease the manual configuration of setting up the SAML app.

Pre loaded config import fails with webpack dynamic module parsing

Issue Summary

Using the PRE_LOADED_CONFIG fails to load the config js file.

config api error: Error: Cannot find module '/Users/xxxxx/Code/jackson/_config/boxyhq.js'

Steps to Reproduce

  1. Run jackson with PRE_LOADED_CONFIG set to point to a local dir
  2. Invoke the GET config
  3. Requests fails with above error

Technical details

Summarized nicely at https://stackoverflow.com/a/42804941/3939061

You cannot use a variable as argument to require. Webpack needs to know what files to bundle at compile time. As it does no program flow analysis, it can't know what you pass to the function. In that case it might be obvious, but this could go as far as using user input to decide what module to require, and there is no way webpack can possibly know which modules to include at compile time, so webpack does not allow it.

Support ForceAuthn

Is your proposal related to a problem?

SAML support ForceAuthn to indicate to the provider that they should force an authentication of the user even if already logged in.

Describe the solution you'd like

We need to set a flag on the config and also maybe allow an override on the back of the OAuth 2.0 authorize request through a custom parameter.

Privacy preserving login

Is your proposal related to a problem?

In heavily regulated industries transfer or identification of employee information (even email) outside the boundary of the company leads to heavy compliance burden. If we provide a way to strip all info except the id then this opens up some interesting opportunities.

Describe the solution you'd like

  • Document mapping of only the ID skipping everything else
  • For any other info that might come via the SAML response we include a flag to strip that out
  • Hash the id so it cannot be mapped back in any form, this also caters to the case where some providers send email as the id

IdP metadata fetch: Swap POST with GET

Is your proposal related to a problem?

Currently, the POST method is used to fetch the IdP metadata. GET would be more apt for the operation.

Describe the solution you'd like

Swap out the POST method with GET and pass the body as a query string in the URL.
Also update the endpoint api/v1/saml/config/get -> /api/v1/saml/config

Husky pre-commit hooks not running

Issue Summary

The husky pre-commit hook is not running now.

Steps to Reproduce

  1. Change a variable declaration to use var instead of const
  2. Stage and commit locally
  3. Ideally the script runs and fixes the eslint issues.

Technical details

  • git commit warning
hint: The '.husky/pre-commit' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.

Add provider specific SAML documentation

Is your proposal related to a problem?

Test more SAML providers and add instructions for each provider.

Describe the solution you'd like

Okta, Google and Auth0 have been tested and supported so far. Test the following popular providers and document specific instructions - OneLogin, Duo, Azure, CyberArk, ADFS, JumpCloud, Shibboleth (not an exhaustive list).

Error reporting & Logging

Is your proposal related to a problem?

Support error reporting and logging.

Describe the solution you'd like

Opentelemetry has support for logging event. Pino for nodejs logging. For frontend if there is no library out there that consolidates this like Opentelemetry we should look to create one.

Validate redirect_uri in all steps

Found a bug? Please fill out the sections below. ๐Ÿ‘

Issue Summary

redirect_uri should be validated at all steps including code exchange - #26

Read xml metadata from a url when setting the config

Is your proposal related to a problem?

Read XML metadata from a URL if available.

Describe the solution you'd like

We can divide this task into two subtasks:

  • Make the required changes to /npm.
  • Admin UI: Add an additional text input for Metadata URL to the create/update SSO connection UI. We'll do this after finishing the first one.

Make the required changes to /npm

  • You can now create an SSO connection by passing an encoded or raw XML metadata to the createSAMLConnection method. Most of the identity providers also provide the URL to read the metadata. So createSAMLConnection should also allow passing a metadata URL if available.
  • We have to add another attribute to the body called metadataUrl to pass the metadata URL.
  • Make the required changes to the method createSAMLConnection within the /npm/src/controller/api.ts file.
  • The new approach should fetch the raw metadata from the URL and use it as rawMetadata.
  • Here are a few additional things you should consider during the implementation.
    • Only accept HTTPS URLs.
    • Set a timeout while fetching the data from the metadata URL and throw an error if the timeout exceeds.
    • Limit the payload size.
  • Since no UI is involved, writing unit tests is the best way to test this implementation. You can create new unit test cases to address code changes you will make. You can find all the test cases in /npm/test/sso folder.
  • Here is a sample metadata URL you can use to test https://mocksaml.com/api/saml/metadata

Hasura auth with SAML Jackson

Is your proposal related to a problem?

Hasura has a plug-and-play auth interface, set up a demo showcasing auth with SAML.

Describe the solution you'd like

SAML Jackson + Hasura, what a mind-blowing combo.

Supertokens.io integration enhancements

Is your proposal related to a problem?

  • Provide tenant and product in userinfo as context or requested params. This will ease things on the frontend during integration - #113.
  • Add a recipe to https://github.com/supertokens/supertokens-node which encapsulates the routes needed for SAML config.

Describe the solution you'd like

Improve developer experience by providing the above quality of service improvements.

Add x509 data to AuthnRequest

Is your proposal related to a problem?

Currently, AuthnRequest is signed but there's no public cert being added to the signature. This means that the request is not being validated.

Describe the solution you'd like

Send the public cert along with AuthnRequest.

Support for API gateways

Is your proposal related to a problem?

Support for API Gateways.

Describe the solution you'd like

We have simple API key auth support but should support the ability to add an API gateway in front. Kong, APISIX and Tyk are a few of the ones we should look at first.

Monorepo for all our examples

Is your proposal related to a problem?

We are starting to have a list of growing examples and integrations. They should be moved to a monorepo, a new one called jackson-examples.

Describe the solution you'd like

Monorepo using Turborepo.

Encode rawMetadata

Issue Summary

Certain gateways might reject the config API request because of rawMetadata, we need to encode it to avoid this.

Steps to Reproduce

Send a config API request to Jackson that is hosted on AWS.

Potential Solution

Add a new attribute, encodedRawMetadata which is a base64 encoding of rawMetadata. This will maintain backwards compatibility.

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.