Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(authentication): suport ldap over unix socket #5397

Merged
merged 5 commits into from
May 7, 2023

Conversation

james-d-elliott
Copy link
Member

No description provided.

This allows listening on unix sockets.

Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
This allows listening on unix sockets.

Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
@authelia
Copy link

authelia bot commented May 6, 2023

Artifacts

These changes are published for testing on Buildkite, DockerHub and GitHub Container Registry.

Docker Container

  • docker pull authelia/authelia:feat-ldap-unix-sock
  • docker pull ghcr.io/authelia/authelia:feat-ldap-unix-sock

@james-d-elliott james-d-elliott changed the title feat(authentication): suport ldap connection over unix socket feat(authentication): suport ldap over unix socket May 6, 2023
@netlify
Copy link

netlify bot commented May 6, 2023

Deploy Preview for authelia-staging ready!

Name Link
🔨 Latest commit 978ca2f
🔍 Latest deploy log https://app.netlify.com/sites/authelia-staging/deploys/64571f45b8106400085b50aa
😎 Deploy Preview https://deploy-preview-5397--authelia-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

config.template.yml Outdated Show resolved Hide resolved
config.template.yml Show resolved Hide resolved
internal/configuration/config.template.yml Outdated Show resolved Hide resolved
internal/configuration/config.template.yml Show resolved Hide resolved
@james-d-elliott james-d-elliott force-pushed the feat-ldap-unix-sock branch 2 times, most recently from c107dd1 to 1b33352 Compare May 6, 2023 22:59
@codecov
Copy link

codecov bot commented May 6, 2023

Codecov Report

Merging #5397 (a78134e) into master (90d1901) will increase coverage by 0.36%.
The diff coverage is 88.17%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5397      +/-   ##
==========================================
+ Coverage   67.79%   68.16%   +0.36%     
==========================================
  Files         279      280       +1     
  Lines       21745    21844      +99     
  Branches      438      438              
==========================================
+ Hits        14742    14889     +147     
+ Misses       6203     6149      -54     
- Partials      800      806       +6     
Flag Coverage Δ
backend 69.12% <88.17%> (+0.39%) ⬆️
frontend 56.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/configuration/schema/types.go 65.57% <ø> (-11.34%) ⬇️
internal/notification/smtp_auth.go 11.42% <0.00%> (ø)
internal/storage/const.go 50.00% <ø> (ø)
internal/ntp/ntp.go 53.06% <32.00%> (+4.17%) ⬆️
internal/ntp/util.go 90.00% <40.00%> (-10.00%) ⬇️
internal/notification/smtp_notifier.go 56.63% <50.00%> (ø)
internal/storage/sql_provider_backend_postgres.go 58.90% <50.00%> (ø)
internal/configuration/validator/storage.go 90.32% <66.66%> (-9.68%) ⬇️
internal/configuration/deprecation.go 83.33% <92.85%> (+33.33%) ⬆️
internal/configuration/schema/types_address.go 95.39% <95.39%> (ø)
... and 7 more

... and 3 files with indirect coverage changes

This adds support for LDAP unix sockets using the ldapi scheme. In addition it improves all of the address related parsing significantly deprecating old options.

Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
@james-d-elliott james-d-elliott force-pushed the feat-ldap-unix-sock branch 5 times, most recently from daad82e to 9dd9a3d Compare May 7, 2023 03:48
.yamllint.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@autheliabot autheliabot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

yamllint

internal/configuration/test_resources/config.deprecated.alt.yml|91 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|92 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|94 col 16| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|94 col 42| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|95 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|100 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|103 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|106 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|110 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|113 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|117 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|120 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|123 col 17| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|123 col 30| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|124 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|127 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|131 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|136 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|141 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|144 col 9| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|147 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|149 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|152 col 22| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|161 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|163 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|164 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|168 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|169 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.alt.yml|171 col 13| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|2 col 26| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|9 col 25| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|11 col 19| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|12 col 19| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|14 col 25| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|16 col 19| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|17 col 19| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|19 col 25| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|21 col 19| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|22 col 19| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|24 col 25| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|27 col 10| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|30 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|33 col 13| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|34 col 20| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|68 col 14| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|69 col 25| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|70 col 26| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|71 col 19| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|72 col 27| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|73 col 20| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|74 col 27| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|75 col 21| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|76 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|79 col 19| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|83 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|84 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|86 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|87 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|90 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|91 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|92 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|94 col 16| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|94 col 42| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|95 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|100 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|103 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|106 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|110 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|113 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|117 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|120 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|123 col 17| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|123 col 30| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|124 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|127 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|131 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|136 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|141 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|144 col 9| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|147 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|149 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|152 col 22| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|161 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|163 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|164 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|168 col 15| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|169 col 11| [error] string value is not quoted with single quotes (quoted-strings)
internal/configuration/test_resources/config.deprecated.yml|171 col 13| [error] string value is not quoted with single quotes (quoted-strings)

@james-d-elliott james-d-elliott force-pushed the feat-ldap-unix-sock branch 2 times, most recently from ad60ffc to 0251caf Compare May 7, 2023 04:55
@james-d-elliott james-d-elliott force-pushed the feat-ldap-unix-sock branch 2 times, most recently from 1394b8f to 40271ff Compare May 7, 2023 06:00
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
# Conflicts:
#	config.template.yml
#	docs/content/en/configuration/miscellaneous/server.md
#	docs/content/en/configuration/prologue/common.md
#	docs/content/en/configuration/telemetry/metrics.md
#	docs/data/configkeys.json
#	internal/configuration/config.template.yml
#	internal/configuration/decode_hooks.go
#	internal/configuration/deprecation.go
#	internal/configuration/provider_test.go
#	internal/configuration/schema/keys.go
#	internal/configuration/schema/types.go
#	internal/configuration/schema/types_test.go
#	internal/configuration/test_resources/config.yml
#	internal/configuration/test_resources/config_alt.yml
#	internal/configuration/test_resources/config_bad_keys.yml
#	internal/configuration/test_resources/config_bad_quoting.yml
#	internal/configuration/test_resources/config_domain_bad_regex.yml
#	internal/configuration/test_resources/config_domain_regex.yml
#	internal/configuration/test_resources/config_oidc.yml
#	internal/configuration/test_resources/config_smtp_sender_blank.yml
#	internal/configuration/test_resources/config_smtp_sender_invalid.yml
#	internal/configuration/test_resources/config_with_secret.yml
#	internal/configuration/validator/const.go
#	internal/configuration/validator/const_test.go
#	internal/suites/ActiveDirectory/configuration.yml
#	internal/suites/BypassAll/configuration.yml
#	internal/suites/CLI/configuration.yml
#	internal/suites/Caddy/configuration.yml
#	internal/suites/Docker/configuration.yml
#	internal/suites/DuoPush/configuration.yml
#	internal/suites/Envoy/configuration.yml
#	internal/suites/HAProxy/configuration.yml
#	internal/suites/HighAvailability/configuration.yml
#	internal/suites/LDAP/configuration.yml
#	internal/suites/MariaDB/configuration.yml
#	internal/suites/MultiCookieDomain/configuration.yml
#	internal/suites/MySQL/configuration.yml
#	internal/suites/NetworkACL/configuration.yml
#	internal/suites/OIDC/configuration.yml
#	internal/suites/OIDCTraefik/configuration.yml
#	internal/suites/OneFactorOnly/configuration.yml
#	internal/suites/PathPrefix/configuration.yml
#	internal/suites/Postgres/configuration.yml
#	internal/suites/ShortTimeouts/configuration.yml
#	internal/suites/Standalone/configuration.yml
#	internal/suites/Traefik/configuration.yml
#	internal/suites/Traefik2/configuration.yml
@james-d-elliott james-d-elliott merged commit fb5c285 into master May 7, 2023
50 checks passed
@james-d-elliott james-d-elliott deleted the feat-ldap-unix-sock branch May 7, 2023 06:39
@james-d-elliott james-d-elliott modified the milestones: v4.39.0, v4.38.0 Aug 2, 2023
@james-d-elliott james-d-elliott added area/config Configuration related features/bugs area/ldap LDAP related features/bugs labels Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config Configuration related features/bugs area/ldap LDAP related features/bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants