diff options
Diffstat (limited to 'server/pkg')
-rwxr-xr-x | server/pkg/create-user-db | 9 | ||||
-rw-r--r-- | server/pkg/soledad-server.service | 2 | ||||
-rw-r--r-- | server/pkg/soledad-sudoers | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/server/pkg/create-user-db b/server/pkg/create-user-db index 9e2b6b50..5e0ef5e2 100755 --- a/server/pkg/create-user-db +++ b/server/pkg/create-user-db @@ -22,7 +22,7 @@ import argparse from leap.soledad.common.couch import CouchDatabase from leap.soledad.common.couch.state import is_db_name_valid from leap.soledad.common.couch import list_users_dbs -from leap.soledad.server.config import load_configuration +from leap.soledad.server._config import get_config BYPASS_AUTH = os.environ.get('SOLEDAD_BYPASS_AUTH', False) @@ -38,8 +38,9 @@ parser.add_argument('dbname', metavar='user-d34db33f', type=str, help='database name on the format user-{uuid4}') parser.add_argument('--migrate-all', action='store_true', help="recreate all design docs for all existing account") -CONF = load_configuration('/etc/soledad/soledad-server.conf') -NETRC_PATH = CONF['soledad-server']['admin_netrc'] +CONF = get_config() +DBCONF = get_config(section='database-security') +NETRC_PATH = CONF['admin_netrc'] def url_for_db(dbname): @@ -78,7 +79,7 @@ def ensure_database(dbname): print ("Invalid name! %s" % dbname) sys.exit(1) url = url_for_db(dbname) - db_security = CONF['database-security'] + db_security = DBCONF db = CouchDatabase.open_database(url=url, create=True, replica_uid=None, database_security=db_security) diff --git a/server/pkg/soledad-server.service b/server/pkg/soledad-server.service index ccd03b97..30c4bf88 100644 --- a/server/pkg/soledad-server.service +++ b/server/pkg/soledad-server.service @@ -3,7 +3,7 @@ Description=Soledad Server [Service] Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin -Environment=CLASS=leap.soledad.server.resource.SoledadResource +Environment=CLASS=leap.soledad.server.entrypoint.SoledadEntrypoint Environment=HTTPS_PORT=2424 Environment=CERT_PATH=/etc/soledad/soledad-server.pem Environment=PRIVKEY_PATH=/etc/soledad/soledad-server.key diff --git a/server/pkg/soledad-sudoers b/server/pkg/soledad-sudoers new file mode 100644 index 00000000..642497f8 --- /dev/null +++ b/server/pkg/soledad-sudoers @@ -0,0 +1,2 @@ +Cmnd_Alias SOLEDAD_CREATE_DB = /usr/bin/create-user-db +soledad ALL=(soledad-admin) NOPASSWD: SOLEDAD_CREATE_DB |