Coder Social home page Coder Social logo

fbc-js-core's Introduction

Magma

Connecting the Next Billion People

License GitHub Release PR's Welcome GitHub contributors GitHub last commit GitHub commit activity the past week CodeCov

Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution. Magma enables better connectivity by:

  • Allowing operators to offer cellular service without vendor lock-in with a modern, open source core network
  • Enabling operators to manage their networks more efficiently with more automation, less downtime, better predictability, and more agility to add new services and applications
  • Enabling federation between existing MNOs and new infrastructure providers for expanding rural infrastructure
  • Allowing operators who are constrained with licensed spectrum to add capacity and reach by using Wi-Fi and CBRS

Magma Architecture

The figure below shows the high-level Magma architecture. Magma is 3GPP generation (2G, 3G, 4G or upcoming 5G networks) and access network agnostic (cellular or WiFi). It can flexibly support a radio access network with minimal development and deployment effort.

Magma has three major components

  • Access Gateway. The Access Gateway (AGW) provides network services and policy enforcement. In an LTE network, the AGW implements an evolved packet core (EPC), and a combination of an AAA and a PGW. It works with existing, unmodified commercial radio hardware.

  • Orchestrator. Orchestrator is a cloud service that provides a simple and consistent way to configure and monitor the wireless network securely. The Orchestrator can be hosted on a public/private cloud. The metrics acquired through the platform allows you to see the analytics and traffic flows of the wireless users through the Magma web UI.

  • Federation Gateway. The Federation Gateway integrates the MNO core network with Magma by using standard 3GPP interfaces to existing MNO components. It acts as a proxy between the Magma AGW and the operator's network and facilitates core functions, such as authentication, data plans, policy enforcement, and charging to stay uniform between an existing MNO network and the expanded network with Magma.

Magma architecture diagram

Documentation

Join the Magma community

See the Community page for entry points.

Start by joining the community on Slack: magmacore workspace.

Direct specific questions to the GitHub Discussions page. Your question might already have an answer!

License

Magma is BSD License licensed, as found in the LICENSE file.

The EPC originates from OAI (OpenAirInterface Software Alliance) and is offered under the same BSD-3-Clause License.

Risks

The Magma materials are provided in accordance with the licenses made available in the LICENSE file. Prior to using the materials, it is highly recommended that you test and verify that the materials meet your specific requirements, including, without limitation, any and all security and performance requirements.

Security

Responsible disclosures from independent researchers are gratefully accepted. See the Security Policy for submission details and Security Overview for Contributors to learn about other ways of contributing.

We wish to acknowledge valuable disclosures by the following security researchers:

  • Guarang Maheta
  • Phi Trần

fbc-js-core's People

Contributors

a8m avatar aclave1 avatar amitarbel avatar andreilee avatar apbuteau avatar cjminer505 avatar dependabot[bot] avatar dlvhdr avatar ekfuhrmann avatar ellaaro avatar facebook-github-bot avatar fbc-hub avatar gityouser avatar hannafar avatar karthiksubraveti avatar kerenbe4 avatar koi-schidurala avatar lucasgonze avatar mescorci avatar mroch avatar rckclmbr avatar scott8440 avatar tcirstea avatar tmnguyen1307 avatar

Stargazers

 avatar  avatar

Watchers

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

fbc-js-core's Issues

bug: cannot-resolve-module multiSamlStrategy

Summary

On loading @fbcnms/auth/strategies/OrganizationSamlStrategy.js, an error is thrown

Steps to Reproduce

  1. Yarn add @fbcnms/auth to any program
  2. require('@fbcnms/auth/strategies/OrganizationSamlStrategy') (see magma/packages/magmalte/server/app.js)
  3. Get error
Error ------------------------------------------- node_modules/@fbcnms/auth/strategies/OrganizationSamlStrategy.js:11:31
Cannot resolve module `passport-saml/multiSamlStrategy`. [cannot-resolve-module]
   11| import MultiSamlStrategy from 'passport-saml/multiSamlStrategy';

Screen Shot

From PR https://github.com/magma/magma/runs/5254772345?check_suite_focus=true

image

Diagnostics

The breaking code is this line in fbcnms-packages/fbcnms-auth/strategies/OrganizationSamlStrategy.js:
’import MultiSamlStrategy from ‘passport-saml/multiSamlStrategy’;'

There was a breaking change in passport-saml. multiSamlStrategy has been moved to the root level, so that the correct code would be:
import {MultiSamlStrategy} from 'passport-saml';

In fact the correct code is currently there in GitHub., but the published code of OrganizationSamlStrategy.js is out of sync with the code in source control.

Code in NPM:

’import MultiSamlStrategy from ‘passport-saml/multiSamlStrategy’;'

Code in GitHub (line 12):

’import {MultiSamlStrategy} from ‘passport-saml’;’

The GitHub version is the correct one.

For quick verification:

yarn add @fbcnms/auth@^0.1.5
grep MultiSamlStrategy node_modules/\@fbcnms/auth/strategies/OrganizationSamlStrategy.js
import MultiSamlStrategy from 'passport-saml/multiSamlStrategy';
$ git clone [email protected]:facebookincubator/fbc-js-core.git
M1-Air-2020:d lucasgonze$ grep MultiSamlStrategy fbc-js-core/fbcnms-packages/fbcnms-auth/strategies/OrganizationSamlStrategy.js 
import {MultiSamlStrategy} from 'passport-saml';

The code changed happened in this January 20 commit: e0b5f6d

I think what happened was that the code was bumped in a PR without a version change, and when there was a version change later the code didn't change. The script was auto-publishes to NPM probably needs both of these things to happen.

Upgrade needed for openid-client used in auth package

fbcnms-auth/package.json specifics "openid-client": "2.4.5". That version of openid-client uses a version of the node-jose that uses a version of the node-forge package with a CVE. We need to upgrade openid-client to use a version of node-jose that uses a version of node-forge at 0.10.0 or greater. The latest version of openid-client is 5.1.0. The version of node-forge it uses is 1.1.0.

Steps:

  1. update openid-client to 5.1.0
  2. update version ID in fbcnms-auth/package.json
  3. publish an update to @fbcnms/auth in npm

CI failure related to "engines" conflict

We're getting this error from tests in the CI:

error [email protected]: The engine "node" is incompatible with this module. Expected version "^12.19.0 || ^14.15.0 || ^16.13.0". Got "17.1.0"
error Found incompatible module.

The closest source is the engines statement in openid-client:

  "engines": {
    "node": "^12.19.0 || ^14.15.0 || ^16.13.0"
  },

Per the error message, the runtime engine is 17.1.0.

openid-client only explicitly ports to even-numbered versions of Node. 17 is not explicitly covered. This does not matter when npm instead instead of yarn, because npm considers the engines value only an advisory. However the CI is using yarn, which applies strict matching to the engines value.

This CI failure doesn't happen in Magma because it uses Node 10,12 or 16.

The CI failure began after upgrading openid-client 2.4.5, which set

  "engines": {
    "node": ">=6.9.0"
  },

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.