Skip to content

Commit 508057d

Browse files
Add initial docs on using alternative data stores
1 parent 7e24727 commit 508057d

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

docs/guides/features/data-stores.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
id: data-stores
3+
title: Using alternative databases as data stores
4+
---
5+
6+
By default Certify The Web uses a set of SQLite file based databases to store configuration for managed certificates and stored credentials. SQLite is a good choice for most users as it is easy to setup and does not require any additional software to be installed. However, if you have a large number of managed certificates you may wish to use an alternative database such as Microsoft SQL Server or PostgreSQL.
7+
8+
## Supported databases
9+
For a database to be supported we need to supply a set of compatible data store providers and the choice of database sercver must support complex JSON data storage and querying.
10+
11+
Currently supported database types include:
12+
- MS SQL Server (2016+)
13+
- PostgreSQL (9.5+)
14+
- SQLite
15+
16+
If you decide to use a database other than SQLite you will need to install the database server software and create a database for Certify The Web to use. You are expected to have the necessary skills to do this and we **do not provide support for database server installation or configuration**. You must ensure your database installation is backed up and maintained.
17+
18+
In all cases you need to setup the initial database schema, users and permissions. You will also need to maintain the necessary database schema updates as new versions of Certify The Web are released.
19+
20+
### Microsoft SQL Server
21+
Read more about how to use SQL Server as a data store: [SQL Server Data Store Getting Started](https://github.com/webprofusion/certify-plugins/tree/development/src/DataStores/SQLServer)
22+
23+
A typical connection string to anev SQL Server database might look like this. Note that `TrustServerCertificate=true` is required for the default self-signed certificates used by SQL Server:
24+
`Server=(local)\SERVERNAME;Database=certify;User Id=certify_app;Password=certify_app_pwd;TrustServerCertificate=true;`
25+
26+
Note that SQL Express is not recommended if the database instance is used by other processes such as another web application as artificial query governor constraints can cause connection or query errors.
27+
28+
### PostgreSQL
29+
Read more about how to use SQL Server as a data store: [PostgreSQL Data Store Getting Started](https://github.com/webprofusion/certify-plugins/tree/development/src/DataStores/Postgres)
30+
31+
A typical connection string to a PostgreSQL database might look like this:
32+
`Server=127.0.0.1;Port=5432;Database=certify;User Id=certify_app;Password=certify_app_pwd;`
33+
34+
### Migrating data to your new data store
35+
- First setup your database for your data store along with the necessary users and permissions.
36+
- Enable the Data Store UI under Settings > UI Settings > Experimental Features. Close and re-open the app.
37+
- Under Settings > General Settings > Data Store, select Manage Data Stores
38+
- Select *Add Data Store*, enter a name for your new database connection, select the server type and enter the connection string.
39+
- Click *Test Connection* to ensure the connection is working. You can find out how to specify .Net connection strings for your database server type by searching https://www.connectionstrings.com
40+
- If you are copying data from your existing database to your new data store, select the Migrate Data option and select the source data store (SQLite) and target (your new data store). Click *Copy Data to Target* to copy data from your existing data store to your new data store. This may take some time depending on the number of managed certificates you have.
41+
- Once completed, you can switch over to your new data store. To do so, click the database icon next to your new data store name in the list, the UI will then prompt you to confirm the switch.
42+
43+
Note: stored credentials are encrypted to the machine account that created them. Copying them to a database does not make them readable by other machines.

0 commit comments

Comments
 (0)