{"id":17520614,"url":"https://github.com/oxzi/greenlight-ldap-sync","last_synced_at":"2025-03-28T23:25:18.427Z","repository":{"id":62865855,"uuid":"372502616","full_name":"oxzi/greenlight-ldap-sync","owner":"oxzi","description":"LDAP sync for BBB's Greenlight","archived":false,"fork":false,"pushed_at":"2024-05-15T17:24:36.000Z","size":20,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T17:40:52.383Z","etag":null,"topics":["bigbluebutton","greenlight","ldap"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSES/GPL-3.0-or-later.txt","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":"2021-05-31T12:41:13.000Z","updated_at":"2024-06-20T17:40:52.384Z","dependencies_parsed_at":"2024-12-08T16:41:35.627Z","dependency_job_id":"ec26e926-b0e0-455e-91ed-396198a84e52","html_url":"https://github.com/oxzi/greenlight-ldap-sync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxzi%2Fgreenlight-ldap-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxzi%2Fgreenlight-ldap-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxzi%2Fgreenlight-ldap-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxzi%2Fgreenlight-ldap-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxzi","download_url":"https://codeload.github.com/oxzi/greenlight-ldap-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246113933,"owners_count":20725546,"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":["bigbluebutton","greenlight","ldap"],"created_at":"2024-10-20T11:24:06.540Z","updated_at":"2025-03-28T23:25:18.410Z","avatar_url":"https://github.com/oxzi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2021 Alvar Penning\n\nSPDX-License-Identifier: GPL-3.0-or-later\n--\u003e\n\n# `greenlight-ldap-sync`\n\nThe [Greenlight][greenlight] web front-end for a BigBlueButton server allows an LDAP-based user authentication by following the [LDAP Auth][greenlight-ldap-auth] documentation section.\n\nHowever, the user data is synchronized only upon first login from the LDAP to Greenlight's PostgreSQL database.\nLater synchronizations are currently not possible, as discussed in [issue #1918][greenlight-issue-1918].\nThose might be necessary if, for example, a user's name changes.\n\nThis tool, `greenlight-ldap-sync`, addresses this issue by performing a resync based on the already existing `.env` configuration file.\nIt is designed to be easily integrated into a default Docker Compose-based installation.\n\n\n## Usage\n\nThe entire program is configured via environment variables.\nThese are those from Greenlight's `.env` file plus the following ones:\n\n- `SYNC_DEBUG`:\n  If this environment variable is set, logging is strongly amplified.\n  This log contains sensitive data and should only be activated for debugging purposes!\n- `SYNC_INTERVAL`:\n  If this environment variable is set, the sync is executed routinely.\n  The value of the variable corresponds to the time interval between the syncs, specified as duration string for Go's [`time.ParseDuration`][golang-time-parseduration] function:\n\n  \u003e A duration string is a […] sequence of decimal numbers, each with optional fraction and a unit suffix, such as \"300ms\" […] or \"2h45m\".\n  \u003e Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n\n\n## Deployment\n\nThe installation is done by adding this repository to the existing Greenlight installation and customizing the `docker-compose.yml` file.\n\n```sh\n# Change to your Greenlight directory, /opt/greenlight for me\ncd /opt/greenlight\n\n# Clone this repository within your greenlight directory\ngit clone https://github.com/oxzi/greenlight-ldap-sync.git\n```\n\nEdit Greenlight's `docker-compose.yml` file and append a new `service` to the file.\nThe following example would perform a sync every hour.\n\n```\n  ldap-sync:\n    build:\n      context: ./greenlight-ldap-sync\n    env_file: .env\n    environment:\n      - SYNC_INTERVAL=1h\n    restart: unless-stopped\n    links:\n      - db\n```\n\nFinally, you need to restart Docker Compose.\nThe initial start with the new container might take a while, as it needs to be built first.\n\n\n## Development\n\nAs `greenlight-ldap-sync` tries to honor Greenlight's `.env` file, it should be copied to this directory.\n\nBy default, Greenlight's PostgreSQL database daemon is only reachable within the Docker network.\nHowever, one can tunnel the PostgreSQL port to the development machine via SSH.\n\n```\n# Fetch container's IP address on the BBB host\nuser@bbb:~$ sudo docker inspect -f '{{ .NetworkSettings.IPAddress }}' greenlight_db_1\n172.17.0.2\n\n# Reconnect and bind the container's port locally\nuser@local:~$ ssh -L 5432:172.17.0.2:5432 bbb\n```\n\nAfterwards, the `DB_HOST` variable within the local `.env` file should be altered to `DB_HOST=localhost`.\n\nSince the deployment is realized via Docker Compose, a Docker container can also be used for development.\nThe necessary environment variables both from the `.env` file as well as those for `greenlight-ldap-sync` can be passed via command line arguments.\n\n```sh\ndocker build -t greenlight-ldap-sync .\n\ndocker run --rm \\\n  --env-file .env \\\n  --env SYNC_DEBUG=on \\\n  --env SYNC_INTERVAL=10s \\\n  --network=host \\\n  greenlight-ldap-sync\n```\n\n\n## License\n\nGNU GPLv3 or later.\n\n\n[golang-time-parseduration]: https://golang.org/pkg/time/#ParseDuration\n[greenlight-issue-1918]: https://github.com/bigbluebutton/greenlight/issues/1918\n[greenlight-ldap-auth]: https://docs.bigbluebutton.org/greenlight/gl-config.html#ldap-auth\n[greenlight]: https://github.com/bigbluebutton/greenlight\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxzi%2Fgreenlight-ldap-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxzi%2Fgreenlight-ldap-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxzi%2Fgreenlight-ldap-sync/lists"}