From b598a79d270b3a91b0e6d5f3b9dca4aecca2dd4c Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sat, 2 Aug 2025 13:02:43 -0500 Subject: fix: convert README.org to README.md --- databases/mongo/README.md | 102 ++++++++++++++++++++++++++++++++++++++++++++ databases/mongo/README.org | 104 --------------------------------------------- 2 files changed, 102 insertions(+), 104 deletions(-) create mode 100644 databases/mongo/README.md delete mode 100644 databases/mongo/README.org (limited to 'databases/mongo') diff --git a/databases/mongo/README.md b/databases/mongo/README.md new file mode 100644 index 0000000..99e1c68 --- /dev/null +++ b/databases/mongo/README.md @@ -0,0 +1,102 @@ +# `admins.py` + +Dependency: + +``` shell +pip install pymongo +``` + +``` python +python ./admins.py +``` + +Example output: + +``` json +[ + { + "_id": "admin.admin", + "user": "admin", + "db": "admin", + "roles": [ + { + "role": "userAdminAnyDatabase", + "db": "admin" + }, + { + "role": "readWriteAnyDatabase", + "db": "admin" + }, + { + "role": "dbAdminAnyDatabase", + "db": "admin" + }, + { + "role": "clusterAdmin", + "db": "admin" + } + ], + "credentials": { + "SCRAM-SHA-1": { + "iterationCount": 10000, + "salt": "abc123", + "storedKey": "storedKeyHash", + "serverKey": "serverKeyHash" + }, + "SCRAM-SHA-256": { + "iterationCount": 15000, + "salt": "def456", + "storedKey": "storedKeyHash256", + "serverKey": "serverKeyHash256" + } + } + }, + { + "_id": "test.user1", + "user": "user1", + "db": "test", + "roles": [ + { + "role": "readWrite", + "db": "test" + } + ], + "credentials": { + "SCRAM-SHA-1": { + "iterationCount": 10000, + "salt": "ghi789", + "storedKey": "storedKeyHashUser1", + "serverKey": "serverKeyHashUser1" + } + } + }, + { + "_id": "test.ldapUser", + "user": "ldapUser", + "db": "test", + "roles": [ + { + "role": "read", + "db": "test" + } + ], + "userSource": "ldap" + }, + { + "_id": "admin.x509User", + "user": "x509User", + "db": "$external", + "roles": [ + { + "role": "readWrite", + "db": "admin" + } + ], + "credentials": { + "MONGODB-X509": { + "subject": "CN=x509User,OU=OrgUnit,O=Org,L=City,ST=State,C=Country" + } + } + } +] +``` diff --git a/databases/mongo/README.org b/databases/mongo/README.org deleted file mode 100644 index 689d37d..0000000 --- a/databases/mongo/README.org +++ /dev/null @@ -1,104 +0,0 @@ -#+title: MongoDB Scripts - -* =admins.py= - -Dependency: - -#+begin_src shell -pip install pymongo -#+end_src - -#+begin_src python -python ./admins.py -#+end_src - -Example output: - -#+begin_src json -[ - { - "_id": "admin.admin", - "user": "admin", - "db": "admin", - "roles": [ - { - "role": "userAdminAnyDatabase", - "db": "admin" - }, - { - "role": "readWriteAnyDatabase", - "db": "admin" - }, - { - "role": "dbAdminAnyDatabase", - "db": "admin" - }, - { - "role": "clusterAdmin", - "db": "admin" - } - ], - "credentials": { - "SCRAM-SHA-1": { - "iterationCount": 10000, - "salt": "abc123", - "storedKey": "storedKeyHash", - "serverKey": "serverKeyHash" - }, - "SCRAM-SHA-256": { - "iterationCount": 15000, - "salt": "def456", - "storedKey": "storedKeyHash256", - "serverKey": "serverKeyHash256" - } - } - }, - { - "_id": "test.user1", - "user": "user1", - "db": "test", - "roles": [ - { - "role": "readWrite", - "db": "test" - } - ], - "credentials": { - "SCRAM-SHA-1": { - "iterationCount": 10000, - "salt": "ghi789", - "storedKey": "storedKeyHashUser1", - "serverKey": "serverKeyHashUser1" - } - } - }, - { - "_id": "test.ldapUser", - "user": "ldapUser", - "db": "test", - "roles": [ - { - "role": "read", - "db": "test" - } - ], - "userSource": "ldap" - }, - { - "_id": "admin.x509User", - "user": "x509User", - "db": "$external", - "roles": [ - { - "role": "readWrite", - "db": "admin" - } - ], - "credentials": { - "MONGODB-X509": { - "subject": "CN=x509User,OU=OrgUnit,O=Org,L=City,ST=State,C=Country" - } - } - } -] -#+end_src -- cgit v1.2.3-70-g09d2