Skip to content

Commit

Permalink
AUTO docusaurus 20230925
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub CI committed Sep 25, 2023
1 parent 19cca34 commit b6d17b2
Show file tree
Hide file tree
Showing 11 changed files with 350 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ jobs:
# Base MITIE image
BASE_MITIE_IMAGE_HASH=${{ hashFiles('docker/Dockerfile.base-mitie') }}
MAKEFILE_MITIE_HASH=${{ hashFiles('Makefile') }}
echo "base_mitie_image_hash=${BASE_MITIE_IMAGE_HASH}" >> $GITHUB_OUTPUT
echo "base_mitie_image_hash=${BASE_MITIE_IMAGE_HASH:0:50}-${MAKEFILE_MITIE_HASH:0:50}" >> $GITHUB_OUTPUT
BASE_IMAGE_MITIE_EXISTS=$((docker manifest inspect rasa/rasa:base-mitie-${BASE_MITIE_IMAGE_HASH:0:50}-${MAKEFILE_MITIE_HASH:0:50} &> /dev/null && echo true || echo false) || true)
echo "base_mitie_exists=${BASE_IMAGE_MITIE_EXISTS}" >> $GITHUB_OUTPUT
Expand Down
105 changes: 53 additions & 52 deletions .typo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,43 @@ excluded_files:

# # Any typos we should ignore?
excluded_words:
- CDD
- Comerica
- ConveRTFeaturizer
- ConveRTTokenizer
- HookimplMarker
- Juste
- NLG
- README
- Tanja
- Vova
- analytics
- anonymization
- anonymized
- asyncio
- backends
- bot
- bot's
- cdd
- CDD
- cmdline
- conftest
- conveRT
- ConveRTFeaturizer
- ConveRTTokenizer
- crf
- crfentityextractor
- crfsuite
- crypto
- custom-nlg-service
- customizable
- daksh
- dataset
- db's
- deque
- docusaurus
- non-latin
- deduplicate
- deduplication
- deque
- docusaurus
- donath
- matplotlib
- dslim
- entitysynonymmapper
- extractor
- fbmessenger
- featurization
Expand All @@ -95,13 +111,17 @@ excluded_words:
- forni
- gzip
- gzipped
- hallo
- hftransformersnlp
- hookimpl
- initializer
- instaclient
- jwt
- jwt's
- ish
- jieba
- jupyter
- jupyterhub
- jwt
- jwt's
- karpathy
- keras
- knowledgebase
Expand All @@ -110,101 +130,82 @@ excluded_words:
- llm
- luis
- matmul
- matplotlib
- mattermost
- memoization
- memoizationpolicy
- miniconda
- mitie
- mitiefeaturizer
- mitie's
- mitiefeaturizer
- mitienlp
- dataset
- mongod
- mrkdown
- mrkdwn
- myio
- mymodelname
- myuser
- numpy
- networkx
- ngram
- nlg
- nlu
- nlu's
- non-latin
- numpy
- perceptron
- pii-management
- pika
- pika's
- jieba
- pluggy
- pre
- pretrained
- prototyper
- prototyper
- pycodestyle
- pykwalify
- pymessenger
- pyobject
- python-engineio
- pre
- customizable
- quickstart
- rasa
- rasa's
- readthedocs
- regexes
- regexfeaturizer
- regularizer
- repo
- rst
- ruamel
- rustc
- rustup
- rustup-init
- sanic
- sanitization
- scipy
- sklearn
- socketio
- spaCy
- spaCy's
- spacy
- spacyfeaturizer
- spacynlp
- ish
- spaCy
- spaCy's
- README
- crf
- backends
- whitespaced
- ngram
- subsampled
- testagent
- thisismysecret
- tokenization
- tokenize
- tokenized
- tokenization
- tokenizer
- tokenizers
- tokenizing
- typoci
- unfeaturized
- unschedule
- wsgi
- ruamel
- prototyper
- hallo
- crypto
- regexes
- venv
- walkthroughs
- webexteams
- venv
- regexfeaturizer
- crfentityextractor
- Comerica
- entitysynonymmapper
- memoizationpolicy
- NLG
- nlg
- Juste
- Tanja
- Vova
- rustup
- rustup-init
- rustc
- conftest
- whitespaced
- winpty
- pii-management
- anonymization
- anonymized
- dslim
- pluggy
- HookimplMarker
- hookimpl
- wsgi

spellcheck_filenames: false
8 changes: 8 additions & 0 deletions changelog/1557.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Added environment variables to configure JWT and auth token.
For JWT the following environment variables are available:
- JWT_SECRET
- JWT_METHOD
- JWT_PRIVATE_KEY

For auth token the following environment variable is available:
- AUTH_TOKEN
38 changes: 38 additions & 0 deletions docs/docs/http-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ rasa run \
--auth-token thisismysecret
```

You can also use environment variable `AUTH_TOKEN` to set the auth token:
```
AUTH_TOKEN=thisismysecret
```

:::tip Security best practice

We recommend that you use environment variables to store
and share sensitive information such as tokens and secrets
when deploying Rasa as Docker container as they will not be stored in your shell history.
:::

Any clients sending requests to the server must pass the token
as a query parameter, or the request will be rejected. For example, to fetch a tracker from the server:

Expand All @@ -85,6 +97,18 @@ rasa run \
--jwt-secret thisismysecret
```

You can also use environment variable `JWT_SECRET` to set the JWT secret:
```
JWT_SECRET=thisismysecret
```

:::tip Security best practice

We recommend that you use environment variables to store
and share sensitive information such as tokens and secrets
when deploying Rasa as Docker container as they will not be stored in your shell history.
:::

If you want to sign a JWT token with asymmetric algorithms, you can specify the JWT private key to the `--jwt-private-key`
CLI argument. You must pass the public key to the `--jwt-secret` argument, and also specify the algorithm to the
`--jwt-method` argument:
Expand All @@ -97,6 +121,20 @@ rasa run \
--jwt-method RS512
```

You can also use environment variables to configure JWT:
```
JWT_SECRET=<public_key>
JWT_PRIVATE_KEY=<private_key>
JWT_METHOD=RS512
```

:::tip Security best practice

We recommend that you use environment variables to store
and share sensitive information such as tokens and secrets
when deploying Rasa as Docker container as they will not be stored in your shell history.
:::

Client requests to the server will need to contain a valid JWT token in
the `Authorization` header that is signed using this secret
and the `HS256` algorithm e.g.
Expand Down
24 changes: 24 additions & 0 deletions docs/docs/reference/rasa/cli/arguments/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,27 @@ def add_server_arguments(parser: argparse.ArgumentParser) -> None

Add arguments for running API endpoint.

#### add\_server\_settings\_arguments

```python
def add_server_settings_arguments(parser: argparse.ArgumentParser) -> None
```

Add arguments for the API server.

**Arguments**:

- `parser` - Argument parser.

#### add\_jwt\_arguments

```python
def add_jwt_arguments(parser: argparse.ArgumentParser) -> None
```

Adds arguments related to JWT authentication.

**Arguments**:

- `parser` - Argument parser.

2 changes: 1 addition & 1 deletion docs/docs/sources/rasa_interactive___help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ options:
--conversation-id CONVERSATION_ID
Specify the id of the conversation the messages are
in. Defaults to a UUID that will be randomly
generated. (default: 38f886f1d51f4930a022dacf9380ba41)
generated. (default: 3f16234cb788484c9906ec35d9d4460a)
--endpoints ENDPOINTS
Configuration file for the model server and the
connectors as a yml file. (default: endpoints.yml)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sources/rasa_shell___help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ options:
-h, --help show this help message and exit
--conversation-id CONVERSATION_ID
Set the conversation ID. (default:
6df409f874c04c1ab6a76af9a9a79760)
5dec363347b4453bbe754a80323afd2d)
-m MODEL, --model MODEL
Path to a trained Rasa model. If a directory is
specified, it will use the latest model in this
Expand Down

0 comments on commit b6d17b2

Please sign in to comment.