Updated README and render it in plugin config
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
The **Login LDAP** Plugin for [Grav CMS](http://github.com/getgrav/grav) allows user authentication against an LDAP Server.
|
The **Login LDAP** Plugin for [Grav CMS](http://github.com/getgrav/grav) allows user authentication against an LDAP Server.
|
||||||
|
|
||||||
## Installation
|
### Installation
|
||||||
|
|
||||||
Installing the Login LDAP plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.
|
Installing the Login LDAP plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ default_access_levels:
|
|||||||
|
|
||||||
> Note that if you use the admin plugin, a file with your configuration will be saved in the `user/config/plugins/login-ldap.yaml`.
|
> Note that if you use the admin plugin, a file with your configuration will be saved in the `user/config/plugins/login-ldap.yaml`.
|
||||||
|
|
||||||
## Usage
|
### Usage
|
||||||
|
|
||||||
Once properly configured, the functionality of the LDAP plugin is transparent to the user. A user will be able to login via the normal login process and have access based on their account setup.
|
Once properly configured, the functionality of the LDAP plugin is transparent to the user. A user will be able to login via the normal login process and have access based on their account setup.
|
||||||
|
|
||||||
|
|||||||
330
blueprints.yaml
330
blueprints.yaml
@@ -29,179 +29,201 @@ form:
|
|||||||
validate:
|
validate:
|
||||||
type: bool
|
type: bool
|
||||||
|
|
||||||
server_section:
|
ldap_tabs:
|
||||||
type: section
|
type: tabs
|
||||||
title: Server Configuration
|
|
||||||
underline: true
|
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
|
|
||||||
host:
|
tab_1:
|
||||||
type: text
|
type: tab
|
||||||
label: Host
|
title: Configuration Options
|
||||||
size: large
|
fields:
|
||||||
help: Host name of the LDAP server
|
|
||||||
placeholder: ldap.yourcompany.com
|
|
||||||
validate:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
port:
|
server_section:
|
||||||
type: number
|
type: section
|
||||||
label: Port
|
title: Server Configuration
|
||||||
default: 389
|
underline: true
|
||||||
size: x-small
|
|
||||||
help: Port to connect to host
|
|
||||||
validate:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
version:
|
fields:
|
||||||
type: number
|
|
||||||
label: Version
|
|
||||||
default: 3
|
|
||||||
size: x-small
|
|
||||||
help: LDAP Version 3 is most popular, only change this if you know what you are doing
|
|
||||||
validate:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
ssl:
|
host:
|
||||||
type: toggle
|
type: text
|
||||||
label: Use SSL
|
label: Host
|
||||||
default: 0
|
size: large
|
||||||
highlight: 0
|
help: Host name of the LDAP server
|
||||||
options:
|
placeholder: ldap.yourcompany.com
|
||||||
1: PLUGIN_ADMIN.YES
|
validate:
|
||||||
0: PLUGIN_ADMIN.NO
|
required: true
|
||||||
validate:
|
|
||||||
type: bool
|
|
||||||
|
|
||||||
start_tls:
|
port:
|
||||||
type: toggle
|
type: number
|
||||||
label: Negotiate TLS
|
label: Port
|
||||||
help: Negotiate TLS encryption with the LDAP server (requires all traffic to be encrypted)
|
default: 389
|
||||||
default: 0
|
size: x-small
|
||||||
highlight: 0
|
help: Port to connect to host
|
||||||
options:
|
validate:
|
||||||
1: PLUGIN_ADMIN.YES
|
required: true
|
||||||
0: PLUGIN_ADMIN.NO
|
|
||||||
validate:
|
|
||||||
type: bool
|
|
||||||
|
|
||||||
opt_referrals:
|
version:
|
||||||
type: toggle
|
type: number
|
||||||
label: Follow Referrals
|
label: Version
|
||||||
help: Sets the value of LDAP_OPT_REFERRALS (Set to "off" for Windows 2003 servers)
|
default: 3
|
||||||
default: 0
|
size: x-small
|
||||||
highlight: 0
|
help: LDAP Version 3 is most popular, only change this if you know what you are doing
|
||||||
options:
|
validate:
|
||||||
1: PLUGIN_ADMIN.YES
|
required: true
|
||||||
0: PLUGIN_ADMIN.NO
|
|
||||||
validate:
|
|
||||||
type: bool
|
|
||||||
|
|
||||||
config_section:
|
ssl:
|
||||||
type: section
|
type: toggle
|
||||||
title: LDAP Configuration
|
label: Use SSL
|
||||||
underline: true
|
default: 0
|
||||||
|
highlight: 0
|
||||||
|
options:
|
||||||
|
1: PLUGIN_ADMIN.YES
|
||||||
|
0: PLUGIN_ADMIN.NO
|
||||||
|
validate:
|
||||||
|
type: bool
|
||||||
|
|
||||||
fields:
|
start_tls:
|
||||||
|
type: toggle
|
||||||
|
label: Negotiate TLS
|
||||||
|
help: Negotiate TLS encryption with the LDAP server (requires all traffic to be encrypted)
|
||||||
|
default: 0
|
||||||
|
highlight: 0
|
||||||
|
options:
|
||||||
|
1: PLUGIN_ADMIN.YES
|
||||||
|
0: PLUGIN_ADMIN.NO
|
||||||
|
validate:
|
||||||
|
type: bool
|
||||||
|
|
||||||
user_dn:
|
opt_referrals:
|
||||||
type: text
|
type: toggle
|
||||||
label: User DN
|
label: Follow Referrals
|
||||||
size: large
|
help: Sets the value of LDAP_OPT_REFERRALS (Set to "off" for Windows 2003 servers)
|
||||||
placeholder: uid=[username],dc=company,dc=com
|
default: 0
|
||||||
help: String used to authenticate a user, where [username] is directly replaced by user value entered via login
|
highlight: 0
|
||||||
validate:
|
options:
|
||||||
required: true
|
1: PLUGIN_ADMIN.YES
|
||||||
|
0: PLUGIN_ADMIN.NO
|
||||||
|
validate:
|
||||||
|
type: bool
|
||||||
|
|
||||||
search_dn:
|
config_section:
|
||||||
type: text
|
type: section
|
||||||
label: User Search DN
|
title: LDAP Configuration
|
||||||
size: large
|
underline: true
|
||||||
placeholder: ou=users,dc=company,dc=com
|
|
||||||
help: String used to retrieve user data. If not provided, extra LDAP user data will not be stored in Grav user account file
|
|
||||||
validate:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
group_dn:
|
fields:
|
||||||
type: text
|
|
||||||
label: Group Search DN
|
|
||||||
size: large
|
|
||||||
placeholder: ou=groups,dc=company,dc=com
|
|
||||||
help: String used to retrieve user group data. If not provided, extra LDAP group data will not be stored in Grav user account file
|
|
||||||
|
|
||||||
map_username:
|
user_dn:
|
||||||
type: text
|
type: text
|
||||||
label: Username Mapping
|
label: User DN
|
||||||
size: large
|
size: large
|
||||||
help: LDAP Attribute(s) that contains the user's username
|
placeholder: uid=[username],dc=company,dc=com
|
||||||
placeholder: uid
|
help: String used to authenticate a user, where [username] is directly replaced by user value entered via login
|
||||||
validate:
|
validate:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
map_fullname:
|
search_dn:
|
||||||
type: text
|
type: text
|
||||||
label: User Fullname Mapping
|
label: User Search DN
|
||||||
size: large
|
size: large
|
||||||
help: LDAP Attribute(s) that contains the user's full name
|
placeholder: ou=users,dc=company,dc=com
|
||||||
placeholder: givenName lastName
|
help: String used to retrieve user data. If not provided, extra LDAP user data will not be stored in Grav user account file
|
||||||
validate:
|
validate:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
map_email:
|
group_dn:
|
||||||
type: text
|
type: text
|
||||||
label: User Email Mapping
|
label: Group Search DN
|
||||||
size: large
|
size: large
|
||||||
help: LDAP Attribute that contains the user's email
|
placeholder: ou=groups,dc=company,dc=com
|
||||||
placeholder: mail
|
help: String used to retrieve user group data. If not provided, extra LDAP group data will not be stored in Grav user account file
|
||||||
validate:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
advanced_section:
|
map_username:
|
||||||
type: section
|
type: text
|
||||||
title: Advanced Configuration
|
label: Username Mapping
|
||||||
underline: true
|
size: large
|
||||||
|
help: LDAP Attribute(s) that contains the user's username
|
||||||
|
placeholder: uid
|
||||||
|
validate:
|
||||||
|
required: true
|
||||||
|
|
||||||
fields:
|
map_fullname:
|
||||||
|
type: text
|
||||||
|
label: User Fullname Mapping
|
||||||
|
size: large
|
||||||
|
help: LDAP Attribute(s) that contains the user's full name
|
||||||
|
placeholder: givenName lastName
|
||||||
|
validate:
|
||||||
|
required: true
|
||||||
|
|
||||||
save_grav_user:
|
map_email:
|
||||||
type: toggle
|
type: text
|
||||||
label: Save Grav user
|
label: User Email Mapping
|
||||||
highlight: 0
|
size: large
|
||||||
default: 0
|
help: LDAP Attribute that contains the user's email
|
||||||
options:
|
placeholder: mail
|
||||||
1: Enabled
|
validate:
|
||||||
0: Disabled
|
required: true
|
||||||
validate:
|
|
||||||
type: bool
|
|
||||||
|
|
||||||
store_ldap_data:
|
advanced_section:
|
||||||
type: toggle
|
type: section
|
||||||
label: Store LDAP data
|
title: Advanced Configuration
|
||||||
help: If storing a local Grav user, you can also store LDAP data to use in Grav
|
underline: true
|
||||||
highlight: 0
|
|
||||||
default: 0
|
|
||||||
options:
|
|
||||||
1: Enabled
|
|
||||||
0: Disabled
|
|
||||||
validate:
|
|
||||||
type: bool
|
|
||||||
|
|
||||||
default_access_levels.groups:
|
fields:
|
||||||
type: selectize
|
|
||||||
size: large
|
save_grav_user:
|
||||||
label: Default Groups
|
type: toggle
|
||||||
'@data-options': '\Grav\User\Groups::groups'
|
label: Save Grav user
|
||||||
classes: fancy
|
highlight: 0
|
||||||
validate:
|
default: 0
|
||||||
type: commalist
|
options:
|
||||||
|
1: Enabled
|
||||||
|
0: Disabled
|
||||||
|
validate:
|
||||||
|
type: bool
|
||||||
|
|
||||||
|
store_ldap_data:
|
||||||
|
type: toggle
|
||||||
|
label: Store LDAP data
|
||||||
|
help: If storing a local Grav user, you can also store LDAP data to use in Grav
|
||||||
|
highlight: 0
|
||||||
|
default: 0
|
||||||
|
options:
|
||||||
|
1: Enabled
|
||||||
|
0: Disabled
|
||||||
|
validate:
|
||||||
|
type: bool
|
||||||
|
|
||||||
|
default_access_levels.groups:
|
||||||
|
type: selectize
|
||||||
|
size: large
|
||||||
|
label: Default Groups
|
||||||
|
'@data-options': '\Grav\User\Groups::groups'
|
||||||
|
classes: fancy
|
||||||
|
validate:
|
||||||
|
type: commalist
|
||||||
|
|
||||||
|
default_access_levels.access.site:
|
||||||
|
type: array
|
||||||
|
label: Default Site Access
|
||||||
|
multiple: false
|
||||||
|
placeholder_key: login
|
||||||
|
placeholder_value: 'true'
|
||||||
|
validate:
|
||||||
|
type: array
|
||||||
|
required: true
|
||||||
|
|
||||||
|
tab_2:
|
||||||
|
type: tab
|
||||||
|
title: Instructions
|
||||||
|
fields:
|
||||||
|
|
||||||
|
ldap_instructions:
|
||||||
|
type: display
|
||||||
|
markdown: true
|
||||||
|
style: vertical
|
||||||
|
file: 'plugins://login-ldap/README.md'
|
||||||
|
|
||||||
default_access_levels.access.site:
|
|
||||||
type: array
|
|
||||||
label: Default Site Access
|
|
||||||
multiple: false
|
|
||||||
placeholder_key: login
|
|
||||||
placeholder_value: 'true'
|
|
||||||
validate:
|
|
||||||
type: array
|
|
||||||
required: true
|
|
||||||
Reference in New Issue
Block a user