You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5d8d03f
Browse filesBrowse the repository at this point in the historyBrowse files
feat: Adding TLS support for offline server. (feast-dev#4744)
* * Adding TLS support for offline server.
* Added test cases for the TLS offline server by creating RemoteOfflineTlsStoreDataSourceCreator
Signed-off-by: lrangine <[email protected]>
* * Fixing the lint error and also integration tests.
Signed-off-by: lrangine <[email protected]>
* * Added documentation for the offline server and moved to how to guide.
* Fixing the issue with integration test.
Signed-off-by: lrangine <[email protected]>
* * Added documentation for the offline server and moved to how to guide.
* Fixing the issue with integration test.
Signed-off-by: lrangine <[email protected]>
* * fixing the integration test by adding extra flag verify_client
Signed-off-by: lrangine <[email protected]>
* * Adding alias names for the host in self-signed certificate.
Signed-off-by: lrangine <[email protected]>
---------
Signed-off-by: lrangine <[email protected]>
Copy file name to clipboardExpand all lines: docs/how-to-guides/starting-feast-servers-tls-mode.md
+68-8Lines changed: 68 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
# Starting feast servers in TLS (SSL) mode.
2
2
TLS (Transport Layer Security) and SSL (Secure Sockets Layer) are both protocols encrypts communications between a client and server to provide enhanced security.TLS or SSL words used interchangeably.
3
3
This article is going to show the sample code to start all the feast servers such as online server, offline server, registry server and UI server in TLS mode.
4
-
Also show examples related to feast clients to communicate with the feast servers started in TLS mode.
4
+
Also show examples related to feast clients to communicate with the feast servers started in TLS mode.
5
+
6
+
We assume you have basic understanding of feast terminology before going through this tutorial, if you are new to feast then we would recommend to go through existing [starter tutorials](./../../examples) of feast.
5
7
6
8
## Obtaining a self-signed TLS certificate and key
7
9
In development mode we can generate a self-signed certificate for testing. In an actual production environment it is always recommended to get it from a trusted TLS certificate provider.
@@ -17,15 +19,32 @@ The above command will generate two files
17
19
You can use the public or private keys generated from above command in the rest of the sections in this tutorial.
18
20
19
21
## Create the feast demo repo for the rest of the sections.
20
-
create a feast repo using `feast init` command and use this repo as a demo for subsequent sections.
22
+
Create a feast repo and initialize using `feast init` and `feast apply` command and use this repo as a demo for subsequent sections.
21
23
22
24
```shell
23
25
feast init feast_repo_ssl_demo
24
-
```
25
26
26
-
Output is
27
-
```
27
+
#output will be something similar as below
28
28
Creating a new Feast repository in /Documents/Src/feast/feast_repo_ssl_demo.
29
+
30
+
cd feast_repo_ssl_demo/feature_repo
31
+
feast apply
32
+
33
+
#output will be something similar as below
34
+
Applying changes for project feast_repo_ssl_demo
35
+
36
+
Created project feast_repo_ssl_demo
37
+
Created entity driver
38
+
Created feature view driver_hourly_stats
39
+
Created feature view driver_hourly_stats_fresh
40
+
Created on demand feature view transformed_conv_rate
41
+
Created on demand feature view transformed_conv_rate_fresh
42
+
Created feature service driver_activity_v1
43
+
Created feature service driver_activity_v3
44
+
Created feature service driver_activity_v2
45
+
46
+
Created sqlite table feast_repo_ssl_demo_driver_hourly_stats_fresh
47
+
Created sqlite table feast_repo_ssl_demo_driver_hourly_stats
29
48
```
30
49
31
50
You need to execute the feast cli commands from `feast_repo_ssl_demo/feature_repo` directory created from the above `feast init` command.
`cert` is an optional configuration to the public certificate path when the online server starts in TLS(SSL) mode. Typically, this file ends with `*.crt`, `*.cer`, or `*.pem`.
`cert`is an optional configuration to the public certificate path when the registry server starts in TLS(SSL) mode. Typically, this file ends with `*.crt`, `*.cer`, or `*.pem`.
112
130
113
131
## Starting feast offline server in TLS mode
114
132
115
-
TBD
133
+
To start the offline server in TLS mode, you need to provide the private and public keys using the `--key` and `--cert` arguments with the `feast serve_offline` command.
You will see the output something similar to as below. Note the server url starts in the `https` mode.
139
+
140
+
```shell
141
+
11/07/2024 11:10:01 AM feast.offline_server INFO: Found SSL certificates in the args so going to start offline server in TLS(SSL) mode.
142
+
11/07/2024 11:10:01 AM feast.offline_server INFO: Offline store server serving at: grpc+tls://127.0.0.1:8815
143
+
11/07/2024 11:10:01 AM feast.offline_server INFO: offline server starting with pid: [11606]
144
+
```
145
+
146
+
### Feast client connecting to remote offline sever started in TLS mode.
147
+
148
+
Sometimes you may need to pass the self-signed public key to connect to the remote registry server started in SSL mode if you have not added the public key to the certificate store.
`cert`is an optional configuration to the public certificate path when the registry server starts in TLS(SSL) mode. Typically, this file ends with `*.crt`, `*.cer`, or `*.pem`.
176
+
`scheme`should be `https`. By default, it will be `http` so you have to explicitly configure to `https` if you are planning to connect to remote offline server which is started in TLS mode.
117
177
118
178
## Starting feast UI server (react app) in TLS mode
119
179
To start the feast UI server in TLS mode, you need to provide the private and public keys using the `--key` and `--cert` arguments with the `feast ui` command.
""" str: remote offline store server port, e.g. the host URL for offline store of arrow flight server. """
85
104
86
105
port: Optional[StrictInt] =None
87
106
""" str: remote offline store server port."""
88
107
108
+
cert: StrictStr=""
109
+
""" str: Path to the public certificate when the offline server starts in TLS(SSL) mode. This may be needed if the offline server started with a self-signed certificate, typically this file ends with `*.crt`, `*.cer`, or `*.pem`.
110
+
If type is 'remote', then this configuration is needed to connect to remote offline server in TLS mode. """
0 commit comments