{"id":22268198,"url":"https://github.com/curityio/mongodb-datasource","last_synced_at":"2025-06-20T14:11:49.586Z","repository":{"id":74437554,"uuid":"129077523","full_name":"curityio/mongodb-datasource","owner":"curityio","description":"A MongoDB data source plugin for the Curity Identity Server","archived":true,"fork":false,"pushed_at":"2024-12-13T17:47:29.000Z","size":838,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-20T14:11:32.727Z","etag":null,"topics":["data-access-provider","datasource","java-8","mongodb","plugin"],"latest_commit_sha":null,"homepage":"https://curity.io/resources/learn/mongo/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/curityio.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-11T10:36:03.000Z","updated_at":"2025-05-07T07:27:51.000Z","dependencies_parsed_at":"2025-03-25T14:45:48.995Z","dependency_job_id":"e15214a2-ef87-4477-8ce9-68f7643a6b6c","html_url":"https://github.com/curityio/mongodb-datasource","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/curityio/mongodb-datasource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Fmongodb-datasource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Fmongodb-datasource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Fmongodb-datasource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Fmongodb-datasource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/curityio","download_url":"https://codeload.github.com/curityio/mongodb-datasource/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Fmongodb-datasource/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260959197,"owners_count":23088823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-access-provider","datasource","java-8","mongodb","plugin"],"created_at":"2024-12-03T11:11:52.889Z","updated_at":"2025-06-20T14:11:44.573Z","avatar_url":"https://github.com/curityio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"MongoDB Data Source Plug-in\n===========================\n\n.. image:: https://travis-ci.org/curityio/mongodb-datasource.svg?branch=dev\n     :target: https://travis-ci.org/curityio/mongodb-datasource\n     \n.. image:: https://img.shields.io/badge/quality-demo-red\n    :target: https://curity.io/resources/code-examples/status/\n\n.. image:: https://img.shields.io/badge/availability-source-blue\n    :target: https://curity.io/resources/code-examples/status/\n   \n\nThis project provides an opens source MongoDB Data Source plug-in for the Curity Identity Server. This allows an administrator to add functionality to Curity which will then enable end users to use MongoDB data source.\n\nSystem Requirements\n~~~~~~~~~~~~~~~~~~~\n\n* Curity Identity Server and `its system requirements \u003chttps://developer.curity.io/docs/latest/system-admin-guide/system-requirements.html\u003e`_\n\nRequirements for Building from Source\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n* Maven 3\n* Java JDK v. 21\n\nCompiling the Plug-in from Source\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe source is very easy to compile. To do so from a shell, issue this command: ``mvn package``.\n\nInstallation\n~~~~~~~~~~~~\n\nTo install this plug-in, compile it from source (as described above). The resulting JAR files in ``target/libs`` needs to placed in the directory ``${IDSVR_HOME}/usr/share/plugins/mongodb``. (The name of the last directory, ``mongodb``, which is the plug-in group, is arbitrary and can be anything.) After doing so, the plug-in will become available as soon as the node is restarted.\n\n.. note::\n\n    The JAR files needs to be deployed to each run-time node and the admin node. For simple test deployments where the admin node is a run-time node, the JAR files only needs to be copied to one location.\n\nFor a more detailed explanation of installing plug-ins, refer to the `Curity developer guide \u003chttps://developer.curity.io/docs/latest/developer-guide/plugins/index.html#plugin-installation\u003e`_.\n\nCreating a MongoDB Data Source in Curity\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nConfiguration using the Admin GUI\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nTo configure a new MongoDB data source using the Curity admin UI, do the following after logging in:\n\n1. Click the ``Facilities`` button at the top-right of the screen.\n2. Next to ``Data Sources``, click ``+``.\n\n    .. figure:: docs/images/facilities-menu.jpg\n        :align: center\n        :width: 600px\n\n3. Enter a name (e.g., ``mongodb1``) and select ``mongodb`` ``Type`` then click ``Create``.\n\n    .. figure:: docs/images/create-datasource1.jpg\n        :align: center\n        :width: 600px\n\n5. You need to fill in all the required configurations for MongoDB like ``Database``, ``Host`` etc.\n\n    .. figure:: docs/images/create-datasource2.jpg\n        :align: center\n        :width: 600px\n\n    .. note::\n\n        The MongoDB-specific configuration is generated dynamically based on the `configuration model defined in the Java interface \u003chttps://github.com/curityio/mongodb-datasource/blob/dev/src/main/java/io/curity/mongodb/datasource/config/MongoDataAccessProviderConfiguration.java\u003e`_.\n\n\nOnce all of these changes are made, they will be staged, but not committed (i.e., not running). To make them active, click the ``Commit`` menu option in the ``Changes`` menu. Optionally enter a comment in the ``Deploy Changes`` dialogue and click ``OK``.\n\nOnce the configuration is committed and running, the data source can be used like any other.\n\n    .. note::\n        This data source is not used for token storage.\n\nConfigure MongoDB\n~~~~~~~~~~~~~~~~~\nYou need to create MongoDB indexes in order to apply uniqueness constraint.\n\nTo create indexes follow the instructions.\n\n1. Connect to MongoDB (To connect in a shell, Run : ``mongo -u ${username} -p ${password} ${dbName}``)\n2. Create unique index for User Account DAP by following command.\n\n    .. code:: python\n\n            db.User.createIndex({userName: 1},{unique: true});\n\n            db.User.createIndex({'emails.value': 1, 'emails.primary': 1}, {'unique': true});\n\n            db.User.createIndex({'phoneNumbers.value': 1, 'phoneNumbers.primary': 1}, {'unique': true});\n\n3. Create unique index for Device DAP by following command.\n\n    .. code:: python\n\n         db.Device.createIndex({'deviceId': 1, 'accountId': 1}, {unique: true})\n\n4. Create unique index for Bucket DAP by following command.\n\n    .. code:: python\n\n       db.Bucket.createIndex({'subject': 1, 'purpose': 1}, {unique: true})\n\n5. Create unique index for Dynamic Clients DAP by following command:\n\n    .. code:: python\n\n        db.DynamicallyRegisteredClients.createIndex({clientId: 1},{unique: true});\n\nAfter you create above indexes, MongoDB is ready to use.\n\nRequired dependencies\n~~~~~~~~~~~~~~~~~~~~~\nFollowing dependencies/jars must be in plugin group classpath.\n\n1. `bson-5.2.1.jar \u003chttps://repo1.maven.org/maven2/org/mongodb/bson/5.2.1/bson-5.2.1.jar\u003e`_\n2. `mongodb-driver-5.1.1.jar \u003chttps://repo1.maven.org/maven2/org/mongodb/bson/5.2.1/bson-5.2.1.jar\u003e`_\n3. `mongodb-driver-core-5.2.1.jar \u003chttps://repo1.maven.org/maven2/org/mongodb/mongodb-driver-core/5.2.1/mongodb-driver-core-5.2.1.jar\u003e`_\n4. `mongodb-driver-sync-5.2.1.jar \u003chttps://repo1.maven.org/maven2/org/mongodb/mongodb-driver-sync/5.2.1/mongodb-driver-sync-5.2.1.jar\u003e`_\n\nLicense\n~~~~~~~\n\nThis plugin and its associated documentation is listed under the `Apache 2 license \u003cLICENSE\u003e`_.\n\nMore Information\n~~~~~~~~~~~~~~~~\n\nPlease visit `curity.io \u003chttps://curity.io/\u003e`_ for more information about the Curity Identity Server.\n\nCopyright (C) 2018 Curity AB.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurityio%2Fmongodb-datasource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurityio%2Fmongodb-datasource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurityio%2Fmongodb-datasource/lists"}