{"id":38839357,"url":"https://github.com/kyhau/nimda","last_synced_at":"2026-01-17T13:59:13.030Z","repository":{"id":73218303,"uuid":"83022679","full_name":"kyhau/nimda","owner":"kyhau","description":"Admin task helper - simple script for doing what people don't want to do","archived":false,"fork":false,"pushed_at":"2025-05-07T07:56:24.000Z","size":67,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T08:43:10.958Z","etag":null,"topics":["bitbucket","confluence","dynamodb","flowdock","jenkins","jira"],"latest_commit_sha":null,"homepage":"https://kyhau.github.io/nimda/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyhau.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2017-02-24T09:04:57.000Z","updated_at":"2021-11-04T06:08:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"d482e72f-b846-46d2-8103-82c70dac30d7","html_url":"https://github.com/kyhau/nimda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kyhau/nimda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyhau%2Fnimda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyhau%2Fnimda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyhau%2Fnimda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyhau%2Fnimda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyhau","download_url":"https://codeload.github.com/kyhau/nimda/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyhau%2Fnimda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28509784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bitbucket","confluence","dynamodb","flowdock","jenkins","jira"],"created_at":"2026-01-17T13:59:12.290Z","updated_at":"2026-01-17T13:59:13.025Z","avatar_url":"https://github.com/kyhau.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nimda #\n\n[![Build Status](https://travis-ci.org/kyhau/nimda.svg?branch=master)](https://travis-ci.org/kyhau/nimda)\n[![codecov](https://codecov.io/gh/kyhau/nimda/branch/master/graph/badge.svg)](https://codecov.io/gh/kyhau/nimda)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://en.wikipedia.org/wiki/MIT_License)\n\nSome helper functions for on/off boarding automation.\n\n## Features\n\n#### 1. Reporting\n\nThe reporting code is in [nimda/services.py](nimda/services.py). \nThe default output folder is `output` and the default log file is `nimda.log`, \nwhich can be changed in the config file (see example [`config/devops.ini`](config/devops.ini)).\n\n1. DynamoDB **`UserAccounts`**:\n    1. Write user accounts' details to `DatabaseUserAccountsSummary.json`.\n    1. Write the following summary to `nimda.log`:\n        1. Total number of users\n        1. Total number of active users\n1. Bitbucket:\n    1. Write current users of each Team to `BitbucketUsers-team-x.csv`.\n    1. Write the following summary to `nimda.log`:\n        1. Users not in database\n        1. Total number of users\n1. Confluence: \n    1. Write current users of all groups to `ConfluenceUsers.csv`.\n    1. Write the following summary to `nimda.log`:\n        1. Users shall have been off boarded (i.e. status in database is not active)\n        1. Users not in database\n        1. Total number of users assigned to any group\n1. Flowdock: \n    1. Write current users having email address found in database to `FlowdockUsers.csv`.\n    1. Write the following summary to `nimda.log`:\n        1. Users shall have been off boarded (i.e. status in database is not active)\n        1. Users not in database\n        1. Total number of users\n1. Jenkins: \n    1. Write current users of all groups to `JenkinsUsers.csv`.\n    1. Write the following summary to `nimda.log`:\n        1. Users shall have been off boarded (i.e. status in database is not active)\n        1. Total number of users\n1. JIRA: \n    1. Write current users of all groups to `JiraUsers.csv`.\n    1. Write the following summary to `nimda.log`:\n        1. Users shall have been off boarded (i.e. status in database is not active)\n        1. Users not in database\n        1. Total number of users assigned to any group\n\n#### 2. Off-boarding\n\n1. **UserAccounts** (DynamoDB):\n    1. Set `status` from `active` to `suspended`\n    1. Unset `bitbucket` attribute\n    1. Unset `confluence` attribute\n    1. Unset `flowdock` attribute\n    1. Unset `jenkins` attribute\n    1. Unset `jira` attribute\n\n1. Bitbucket:\n    1. Remove all user access (actual license counts) in the team(s).\n\n1. Confluence:\n    1. Remove user from all groups\n    1. Revoke (Confluence) application access (actual license counts)\n    1. Deactivate user (not deleted)\n\n1. Flow:\n    1. Remove user from the organisation\n\n1. Jenkins:\n    1. Delete user (Jenkins actually does not delete a user but hides it from all views).\n    1. WON'T DO: Not removing user from Role because the api is crap and does not only requires to post all users' permission details.\n\n1. JIRA:\n    1. Remove user from all groups\n    1. Revoke (JIRA) application access (actual license counts)\n    1. Deactivate user (not deleted)\n\n#### 3. Transferring\n\nSimilar to Off-boarding (at the moment), except\n\n1. **UserAccounts** (DynamoDB):\n    1. Set `status` from `active` to `transferred`\n1. No Confluence off boarding (Confluence is shared with all Biarri groups)\n1. No Flowdock off boarding (Flowdock is shared with all Biarri groups)\n\n#### 4. On-boarding \n\n1. `UserAccounts` (DynamoDB):\n    1. Set `gmail` with the given user name\n    1. Set `active` to `active`\n1. (TODO)\n\n\n## Current Implementation\n\n1. Use `boto3` to interact with DynamoDB.\n\n1. Use [`pybitbucket`](https://bitbucket.org/atlassian/python-bitbucket) to interact with Bitbucket;\n require to write additional functions to support some user management functions.\n\n1. Use `requests` to write a client to interact with [Confluence REST API](https://docs.atlassian.com/atlassian-confluence/REST/latest/). \n \u003cbr\u003e Note that it's the `username` required for `auth`.\n\n1. Use `requests` to write a client to interact with [Flowdock REST API](https://www.flowdock.com/api/rest). \n \u003cbr\u003e Note that it's the `user email address` required for `auth`.\n\n1. Use `requests` to write a client to interact with Jenkins API. \n \u003cbr\u003e Note that it's the `username` required for `auth`.\n\n1. Use [`jira`](https://pypi.python.org/pypi/jira/) to interact with JIRA; \n require to write additional functions to support some user management functions.\n \u003cbr\u003e Note that it's the `user email address` required for `auth`.\n\n\n\n## Run\n\n1. Update the config file (see [`config/devops.ini`](config/devops.ini)).\n\n1. `pip install` the latest version of `nimda`.\n\n1. For reporting:\n\n   ```bash\n   nimda --config config/devops.ini \n   ```\n\n1. To off board a user:\n\n   ```bash\n   nimda --config config/devops.ini --offboard [gmail-acc-name e.g. firstname.lastname]\n   ```\n\n1. To transfer a user to other business group:\n\n   ```bash\n   nimda --config config/devops.ini --transfer [gmail-acc-name e.g. firstname.lastname]\n   ```\n\n1. User `--help` to see all options.\n\n## Build\n\n*Linux*\n\n```bash\nvirtualenv env\n. env/bin/activate\npip install -e .\n```\n\n*Windows*\n```cmd\nvirtualenv env\nenv\\Scripts\\activate\npip install -e .\n```\n\n## Tox Tests and Build the Wheels\n\n*Linux*\n\n```bash\n./test.sh\n```\n\n*Windows*\n\n```cmd\ntest.bat\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyhau%2Fnimda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyhau%2Fnimda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyhau%2Fnimda/lists"}