Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Apr 5, 2023
1 parent 2ca6d51 commit 5b18c45
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ represented by the pull requests that fixed them. Critical items to know are:


## [master](https://github.com/singularityhub/sregistry/tree/master) (master)
- update to use Django 4.2 (2.1.0)
- consolidate config into one file with environment (2.0.0)
- This is an API breaking change, as the settings are completely refactored
- update python base to 3.9, minio server to use new credentials (1.1.4)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.1
2.1.0
19 changes: 18 additions & 1 deletion docs/_docs/plugins/ldap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Hub)](https://hub.docker.com/r/mwaeckerlin/openldap/) is a useful container conf
with unencrypted, StartTLS, and SSL access to an OpenLDAP directory.

## Quick Start

This quick start is intended to demonstrate basic functionality of the LDAP server, and you should
review the links referenced above for more detail.

Expand Down Expand Up @@ -81,6 +82,7 @@ CONTAINER ID IMAGE COMMAND CREATED
```

#### Interact with it

Here is a way to get familiar with the executables inside the image for ldap:

```bash
Expand Down Expand Up @@ -325,4 +327,19 @@ Once you have set these options, startup sregistry and you should be able to see

![ldap.png](../../assets/img/ldap.png)

and login with the username/password pairs *testuser/testuser* and *testadmin/testadmin*. As a final note, if you choose this method to deploy an actual ldap server, you might consider adding the container to the docker compose. If you've done this and need help, or want to contribute what you've learned, please submit a Pull Request to update these docs.
and login with the username/password pairs *testuser/testuser* and *testadmin/testadmin*.

#### Debugging

LDAP is hard to setup, and while we aren't experts, we can keep a log of errors (and resolutions)
that come up for our user base. If you see this error:

```console
Authentication failed for USERNAME: failed to map the username to a DN.
```

The solution can be found [here](https://stackoverflow.com/a/37033098). The string "uid" had to be
replaced with "samaccountname" described [here](https://github.com/singularityhub/sregistry/blob/master/shub/settings.py#L580).


As a final note, if you choose this method to deploy an actual ldap server, you might consider adding the container to the docker compose. If you've done this and need help, or want to contribute what you've learned, please submit a Pull Request to update these docs.
4 changes: 3 additions & 1 deletion shub/apps/main/models/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class Collection(models.Model):
secret = models.CharField(
max_length=200, null=False, verbose_name="Collection secret for webhook"
)
metadata = models.JSONField(default=dict) # open field for metadata about a collection
metadata = models.JSONField(
default=dict
) # open field for metadata about a collection
tags = TaggableManager()

# Users
Expand Down
2 changes: 1 addition & 1 deletion shub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def __iter__(self):
# Custom user model (unlikely to change)
AUTH_USER_MODEL = "users.User"
SOCIAL_AUTH_USER_MODEL = "users.User"
DEFAULT_AUTO_FIELD='django.db.models.AutoField'
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

# Allow setting custom hosts in the environment
ALLOWED_HOSTS = cfg.ALLOWED_HOSTS or ["*"]
Expand Down

0 comments on commit 5b18c45

Please sign in to comment.