Database, Search, and Cache Configuration

Authentication Configuration

Colectica Portal supports two methods of authentication:

  • Built-in user name and password configuration
  • ActiveDirectory

The Colectica Portal package ships with two different Web.config files: Web.config.Identity.dist (for user name and password), and Web.config.ActiveDirectory.dist (for Active Directory). Choose which file is appropriate for your deployment. Make a copy of that file, and rename it to Web.config.

Connection Strings

To configure which databases and which cache Colectica Portal uses, you can edit the connection strings. These are configured in the appsettings.json file.

  1. Navigate to PortalDir\.

  2. If there is not a file named appsettings.json, then copy the appsettings.json.dist file to appsettings.json.

  3. In the appsettings.json file, update the following settings.

    Redis - ConnectionString

    The hostname of the server running the Redis cache; usually localhost.

    Redis - InstanceName

    The Redis instance name; usually PortalRedis.

    Data - DefaultConnection - ConnectionString

    The full connection string of the database to use to store authentication tables, when using Colectica Portal’s built in user management.

    Data - ColecticaRepository - ConnectionString

    The full connection string of the Colectica Repository database.

Example Connection Strings: SQL Server

"DefaultConnection": {
  "ConnectionString": "Server=.;Initial Catalog=aspnet5-users;Trusted_Connection=True;MultipleActiveResultSets=true",
  "ProviderName": "System.Data.SqlClient"
},
"ColecticaRepository": {
  "ConnectionString": "Server=.; Initial Catalog=colectica; Integrated Security=SSPI;",
  "ProviderName": "System.Data.SqlClient"
}

Example Connection Strings: PostgreSQL

DefaultConnection": {
  "ConnectionString": "User ID=postgres;Password=Postgres1234;Host=localhost;Port=5432;Database=colectica-users;",
  "ProviderName": "Npgsql"
},
"ColecticaRepository": {
  "ConnectionString": "User ID=postgres;Password=Postgres1234;Host=localhost;Port=5432;Database=colectica;",
  "ProviderName": "Npgsql"
},

Elasticsearch Index

The index name used to access Elasticsearch can be customized. This setting should have the same index name used when populating the index via the CacheBuilder tool.

  1. In the appsettings.json file, update the following settings.

    Elasticsearch - Host

    The hostname and port used to access the Elasticsearch server (e.g., http://localhost:9200).

    Elasticsearch - IndexName

    The name of the Elasticsearch index.

Database Initialization

The Colectica Repository database should have been created during Colectica Repository deployment. See Create the Database for details.

Colectica Portal uses a separate database to store informaiton about user accounts. This database is created automatically.