Skip to content

Commit

Permalink
Updated readme and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Feb 9, 2021
1 parent 3834b6f commit 15216de
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.6.0]

- [#34](https://github.com/ValoIntranet/doctor/issues/34): Add support for certificate authentication

## [1.5.0]

- [#33](https://github.com/ValoIntranet/doctor/issues/33): Page template support added
Expand Down
Binary file added assets/app-certificate-upload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-certificate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/app-reg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 37 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ doctor publish --url https://<tenant>.sharepoint.com/sites/<documentation>
Options are specified via command arguments, or within a `doctor.json` file (automatically gets created on initialization `doctor init`).

`-a, --auth <auth>`
: Specify the authentication type to use. Values can be `deviceCode` (default) or `password`.
: Specify the authentication type to use. Values can be `deviceCode` (default) or `password` or `certificate`.

> **Info**: Check out the [Certificate Authentication](#certificate-authentication) section for more information about using the `certificate` approach.

`--username`
Expand Down Expand Up @@ -294,16 +296,42 @@ The menu property can contain a `QuickLaunch` and/or `TopNavigationBar` elment w

> **Important**: If you specify arguments during command execution, they will be used instead of the values defined in the `doctor.json` file.
## Todo
### Certificate authentication

If you want to use certificate authentication, you will need to follow the next steps before you can use `doctor`.

- Go to your [Azure Portal](https://portal.azure.com)
- Open your **Azure Active Directory**
- Click on **App registrations**
- Click on **New registration**
- Specify a name for your new Azure AD app

![](./assets/app-reg.png)

- Once the app is created, click on **API Permissions** and add the **Sites.FullControl.All** application permission scope from SharePoint

![](./assets/app-permissions.png)

- Click on **Grant admin consent for <tenant>**, and accept
- Open a command prompt, and run the following command in order to generate a certificate: `openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 366 -nodes`

- [x]: Update links to the actual pages in SharePoint
- [x]: Create static build output of the updated markdown files
- [x]: Cross-platform support
![](./assets/app-certificate.png)

- Upload the **cert.pem** file to the Azure AD App under **Certificates & secrets**

![](./assets/app-certificate-upload.png)

- Converted the certificate into the `PKCS` format using `openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem`
- It will ask for a password. This is yours to pick. Be aware, if you specify a password, you will also need to pass it to the `doctor` command with the `--password <password>` argument.
- Use the `Base64` output as the input for the `--certificateBase64Encoded <certificateBase64Encoded>` argument.

Once you did the previous steps, you are ready to make use of the `doctor` tool. You can run `doctor` with the certificate authentication as follows: `doctor publish --auth certificate --certificateBase64Encoded <certificateBase64Encoded> --appId <appId> --tenant <tenant> --url <url>`.

> **Info**: You can also store these `certificateBase64Encoded`, `appId`, and `tenant` settings in the `doctor.json` file. More information can be found under the [doctor.json](#doctorjson) section.
## Todo

- [ ]: Support for metadata in Front Matter
- [ ]: Support for page description
- [ ]: Support for setting header image
- [ ]: Specify which parts of the publish process needs to run (`skipAuth`, `skipPages`, `skipNavigation`)
All ideas can be found in our [issue list](https://github.com/ValoIntranet/doctor/issues) tagged with [enhancement](https://github.com/ValoIntranet/doctor/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement).

## Found an issue?

Expand Down

0 comments on commit 15216de

Please sign in to comment.