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
This is the Open Cybersecurity Schema Framework (OCSF) server source code repository.
3
+
This repository contains the Open Cybersecurity Schema Framework (OCSF) Schema Server source code.
4
+
The schema server is an HTTP server that provides a convenient way to browse and use the OCSF schema.
4
5
5
-
## Obtaining the source code
6
+
You can access the OCSF schema server, which is running the latest released schema, at [schema.ocsf.io](https://schema.ocsf.io).
6
7
7
-
Clone the GitHub OCFS WEB Server repository. Use `--recurse-submodules` to the `git clone` command, which will automatically initialize and update the schema submodule in the repository:
8
+
The schema server can be also used locally. To do that clone the `ocsf-server` and `ocsf-schema` repositories and follow the instruction below to build and run the schema server.
Change the `path/to` to your local OCSF schema directory (use an absolute path). Note, the `-p 8443:8443` parameter enables HTTPS with a self-signed SSL certificate.
25
28
26
-
Run the docker schema server with added local schema extensions:
This section describes how to make a release of the event schema server.
167
+
| SCHEMA_DIR | The directory containing the schema, default: `../ocsf-schema`|
168
+
| SCHEMA_EXTENSION | The directory containing the schema extensions, relative to SCHEMA_DIR or absolute path |
169
+
| RELEASE_NODE | The Erlang node name. Set it if you want to run more than one server on the same computer |
180
170
181
-
### Create a release
182
-
183
-
The schema server project uses the [`Elixir Releases`](https://hexdocs.pm/mix/Mix.Tasks.Release.html) to produce an Erlang/OTP release package. To make a production release package, run this command:
184
-
185
-
```bash
186
-
MIX_ENV=prod mix release --path dist
187
-
```
188
-
189
-
This command creates the release in the `./dist` directory.
190
-
191
-
You can use one of the following options to start the Schema server (see the above environment variables):
192
-
193
-
```bash
194
-
# starts the schema server in the foreground
195
-
> bin/schema_server start
196
-
197
-
# starts the schema server with IEx attached, like 'iex -S mix phx.server'
198
-
> bin/schema_server start_iex
199
-
200
-
# starts the schema server in the background, must be stopped with the 'bin/schema_server stop' command
201
-
> bin/schema_server daemon
202
-
```
203
-
204
-
For example to start the schema server, with all extensions, from the `dist` folder use:
A release is built on a **host**, a machine which contains Erlang, Elixir, and any other dependencies needed to compile the schema server. A release is then deployed to a **target**, potentially the same machine as the host, but usually a separate target host.
220
-
221
-
To deploy the schema server, copy the release archive file (`dist/schema_server-<version>.tar.gz`) from the release folder to the target. Extract the release files to disk from the archive. Note, the following must be the same between the **host** and the **target**:
222
-
223
-
- Target architecture (for example, x86_64 or ARM)
224
-
- Target vendor + operating system (for example, Windows, Linux, or Darwin/macOS)
0 commit comments