Code Monkey home page Code Monkey logo

Comments (3)

jeffwilcox avatar jeffwilcox commented on May 12, 2024

Interesting... we don't have a containers.json on our end... is there an exception/stack trace you can share?

from opensource-management-portal.

RobCannon avatar RobCannon commented on May 12, 2024

The following code will fail, from middleware/passport-config.js on line 84. The config.containers element is undefined, unless that file is present.

 let aadStrategy = new OIDCStrategy({
    redirectUrl: config.activeDirectory.redirectUrl,
    allowHttpForRedirectUrl: config.containers.docker || config.webServer.allowHttp,
    realm: config.activeDirectory.tenantId,
    clientID: config.activeDirectory.clientId,
    clientSecret: config.activeDirectory.clientSecret,
    oidcIssuer: config.activeDirectory.issuer,
    identityMetadata: 'https://login.microsoftonline.com/' + config.activeDirectory.tenantId + '/.well-known/openid-configuration',
    responseType: 'id_token code',
    responseMode: 'form_post',
    validateIssuer: true,
  }, activeDirectorySubset);

Further, I see where that is used to make HTTP allowable, which is useful since I making this work from a container where HTTPS termination will take place on the load balancer (code from middleware/index.js).

  if (!initializationError) {
    if (!web) {
      /* No web routes */
    } else if (config.containers && config.containers.deployment) {
      console.log('Container deployment: HTTP: listening, HSTS: on');
      app.use(require('./hsts'));
    } else if (config.containers && config.containers.docker) {
      console.log('Docker image: HTTP: listening, HSTS: off');
    } else if (config.webServer.allowHttp) {
      console.warn('WARNING: Development mode (DEBUG_ALLOW_HTTP): HTTP: listening, HSTS: off');
    } else {
      app.use(require('./sslify'));
      app.use(require('./hsts'));
    }

from opensource-management-portal.

jeffwilcox avatar jeffwilcox commented on May 12, 2024

Found the files; they were added in a refactor for Docker support internally in the past.

#75

This PR contains the file/s if you need access now.

from opensource-management-portal.

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.