link the Active Directory example in the howto section

This commit is contained in:
Nicola Murino 2021-03-22 09:52:05 +01:00
parent 79060d37a7
commit 28f1d66ae5
No known key found for this signature in database
GPG key ID: 2F1FB59433D5A8CB
3 changed files with 25 additions and 23 deletions

View file

@ -3,3 +3,4 @@
Here we collect step-to-step tutorials. SFTPGo users are encouraged to contribute!
- [SFTPGo with PostgreSQL data provider and S3 backend](./postgresql-s3.md)
- [SFTPGo on Windows with Active Directory Integration + Caddy Static File Server](https://www.youtube.com/watch?v=M5UcJI8t4AI)

View file

@ -1,4 +1,4 @@
# php-activedirectory-http-server
# SFTPGo on Windows with Active Directory Integration + Caddy Static File Server Example
[![SFTPGo on Windows with Active Directory Integration + Caddy Static File Server Example](https://img.youtube.com/vi/M5UcJI8t4AI/0.jpg)](https://www.youtube.com/watch?v=M5UcJI8t4AI)
@ -8,8 +8,7 @@ The Youtube Walkthrough/Tutorial video above goes into considerable more detail,
Additionally, I go through using the Caddy web server, to help enable serving of static files, if this is something that would be of interest for you.
To get started, you'll want to download the latest release ZIP package from the `sftpgo-ldap-http-server` repository:
* https://github.com/orware/sftpgo-ldap-http-server
To get started, you'll want to download the latest release ZIP package from the [sftpgo-ldap-http-server repository](https://github.com/orware/sftpgo-ldap-http-server).
The ZIP itself contains the `sftpgo-ldap-http-server.exe` file, along with an `OpenLDAP` folder (mainly to help if you want to use TLS for your LDAP connections), and a `Data` which contains a logs folder, a configuration.example.php file, a functions.php file, and the LICENSE and README files.
@ -19,7 +18,7 @@ Once configured, from a command prompt window, if you are already in the same fo
The video above definitely goes through some troubleshooting situations you might find yourself coming across, so while it is long (at about 1 hour, 42 minutes), it may be helpful to review and avoid some issues and just to learn a bit more about SFTPGo and the integration above.
## Example Virtual Folders Configuration (Allowing for Both a Public and Private Folder):
## Example Virtual Folders Configuration (Allowing for Both a Public and Private Folder)
The following can be utilized if you'd like to assign your users both a Private Virtual Folder and Public Virtual Folder.
@ -52,7 +51,7 @@ $virtual_folders['example'] = [
];
```
## Example Connection "Output Object" Allowing For No Files in the User's Home Directory ("Root Directory") but Allowing for Files in the Public/Private Virtual Folders:
## Example Connection "Output Object" Allowing For No Files in the User's Home Directory ("Root Directory") but Allowing for Files in the Public/Private Virtual Folders
The magic here happens in the "permissions" value, by limiting the root/home directory to just the list/download permissions, and then allowing all permissions on the Public/Private virtual folders.
@ -82,7 +81,7 @@ $connection_output_objects['example'] = [
];
```
## Recommended Usage of Automatic Groups Mode (Limiting by Group Prefix):
## Recommended Usage of Automatic Groups Mode (Limiting by Group Prefix)
The `sftpgo-ldap-http-server` project is able to automatically create virtual folders for any groups your user is a memberof if the automatic mode is turned on. However, by having a specific set of allowed prefixes defined, you can limit things to just those groups that begin with the prefixes you've listed, which can be helpful. The prefix itself will be removed from the group name when added as a virtual folder for the user.
@ -114,9 +113,9 @@ $allowed_group_prefixes = [
];
```
## Example Caddyfile Configuration You Can Adapt for Your Needs:
## Example Caddyfile Configuration You Can Adapt for Your Needs
```
```shell
### Re-usable snippets:
(add_static_file_serving_features) {

View file

@ -1710,7 +1710,9 @@ func TestClientCertificateAuthRevokedCert(t *testing.T) {
client := getWebDavClient(user, true, tlsConfig)
err = checkBasicFunc(client)
if assert.Error(t, err) {
assert.Contains(t, err.Error(), "bad certificate")
if !strings.Contains(err.Error(), "bad certificate") && !strings.Contains(err.Error(), "broken pipe") {
t.Errorf("unexpected error: %v", err)
}
}
_, err = httpdtest.RemoveUser(user, http.StatusOK)