Skip to content

Commit

Permalink
Merge branch 'master' into auth/self-host-and-key-connector-docs-impr…
Browse files Browse the repository at this point in the history
…ovements
  • Loading branch information
JaredSnider-Bitwarden authored Sep 20, 2023
2 parents ac93892 + e0b77ad commit d63fdcb
Show file tree
Hide file tree
Showing 7 changed files with 381 additions and 301 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- name: Set up Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- name: Set up Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
Expand Down
49 changes: 49 additions & 0 deletions docs/getting-started/enterprise/key-connector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ understand how it works.
MacOS requires updated SSL libraries, otherwise you will receive the error "No usable version of
libssl was found".

<Tabs>
<TabItem value="intel" label="Intel" default>

1. Install [Homebrew](https://brew.sh/)
2. Install the OpenSSL package:
```bash
Expand All @@ -47,6 +50,42 @@ libssl was found".
4. If you are running the Key Connector from a terminal, restart your terminal to make sure the
updated `.zshrc` settings are applied

</TabItem>
<TabItem value="arm" label="ARM">

Given that the Key Connector project is based on NET 5 then we need to use the x86_64 version of
OpenSSL, thus installing x86_64 packages using Homebrew (a guide with several approaches can be
found
[here](https://www.wisdomgeek.com/development/installing-intel-based-packages-using-homebrew-on-the-m1-mac/)).

1. Install Rosetta
```bash
softwareupdate --install-rosetta
```
2. Set your terminal to Open using Rosetta (create a duplicate of the terminal application -> Go to
Get Info -> check Open using Rosetta).
3. Install [Homebrew](https://brew.sh/)

3.a This should gives us a Homebrew living in `/usr/local` but if it doesn't work prepend
`arch -x86_64` before the Homebrew installation command.

4. Install the OpenSSL package using the x86_64 Homebrew:
```bash
arch -x86_64 /usr/local/homebrew/bin/brew install openssl
```
5. Set the required environment variables to point to the OpenSSL libraries:
```bash
echo 'export DYLD_LIBRARY_PATH="/usr/local/opt/[email protected]/lib"' >> ~/.zshrc
```
6. If you are running the Key Connector from a terminal, restart your terminal to make sure the
updated `.zshrc` settings are applied or run
```bash
source ~/.zshrc
```

</TabItem>
</Tabs>

## Setup and configuration

1. Clone the repository:
Expand Down Expand Up @@ -139,6 +178,16 @@ Run the following command from the repository root:
dotnet run --project src/KeyConnector --configuration Development
```

:::note

If running on ARM based Mac you may need to use `/usr/local/share/dotnet/x64/dotnet`

```bash
/usr/local/share/dotnet/x64/dotnet run --project src/KeyConnector --configuration Development
```

:::

The `--configuration` flag is required for MacOS to use the right SSL libraries.

</TabItem>
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/server/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,11 @@ repository.
pwsh setup_secrets.ps1
```
The helper script also supports an optional flag which removes all existing settings before
re-applying them:
The helper script also supports an optional `-clear` switch which removes all existing settings
before re-applying them:
```bash
pwsh setup_secrets.ps1 -clear:$True
pwsh setup_secrets.ps1 -clear
```
## Build and Run the Server
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/server/self-hosted/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ After the updates to your `secrets.json` file in your self-hosted repo, apply yo
running the following command:

```bash
pwsh setup_secrets.ps1 -clear:$True
pwsh setup_secrets.ps1 -clear
```

You have now updated the user secrets for your self-hosted instance.
Expand Down
Loading

0 comments on commit d63fdcb

Please sign in to comment.