Add LDAP BindPasswordFile#929
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds LDAP bind password file support: configuration gains ChangesLDAP bind password file support
Sequence DiagramsequenceDiagram
participant LDAPService
participant utils
participant LDAPConn
LDAPService->>utils: GetSecret(BindPasswordFile or BindPassword)
utils-->>LDAPService: resolved password
LDAPService->>LDAPService: set LDAP.Config.LDAP.BindPassword
LDAPService->>LDAPService: clear LDAP.Config.LDAP.BindPasswordFile
LDAPService->>LDAPConn: Bind(bindDN, resolved password)
LDAPConn-->>LDAPService: bind result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Related Knowledge 1 document with suggested updates is ready for review. Tinyauth's Space In TinyAuth v5, how can you restrict OIDC client access to only users belonging to a specific LDAP group (e.g., "family"), and is there a way to apply this restriction directly on the OIDC client rather than on app-level forward auth?View Suggested Changes@@ -23,6 +23,7 @@
TINYAUTH_LDAP_ADDRESS=ldap://lldap:3890
TINYAUTH_LDAP_BINDDN=uid=tinyauth,ou=people,dc=example,dc=com
TINYAUTH_LDAP_BINDPASSWORD=<password>
+# Alternatively, use TINYAUTH_LDAP_BINDPASSWORDFILE=/path/to/password/file for more secure credential management
TINYAUTH_LDAP_BASEDN=dc=example,dc=com
TINYAUTH_LDAP_SEARCHFILTER=(uid=%s)
TINYAUTH_LDAP_GROUPCACHETTL=900 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/service/ldap_service.go`:
- Around line 215-217: The build fails because utils.GetSecret used in
ldap_service.go (the lines assigning ldap.config.LDAP.BindPassword and clearing
BindPasswordFile) is undefined; add the package import
"github.com/tinyauthapp/tinyauth/internal/utils" to the imports in that file so
GetSecret can be referenced (ensure the import is added alongside other imports
and no alias conflicts exist).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 53335dbc-3ea6-46ef-a483-071b5519141b
📒 Files selected for processing (2)
internal/model/config.gointernal/service/ldap_service.go
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Fixes #927
Summary by CodeRabbit