3
0

Docs moved to corteza-docs repo

This commit is contained in:
Denis Arh
2019-07-14 11:14:57 +02:00
parent 00bad0cfce
commit dd5820253f
4 changed files with 3 additions and 228 deletions
+3 -17
View File
@@ -19,20 +19,6 @@ Corteza Low Code is the flexible and easy to use open source Low Code Developmen
**Corteza One**
Corteza One manages the user experience for Corteza applications, such as CRM, Messaging and Low Code, as well as providing an integrated interface for third party or other bespoke applications. 100% responsive and with an intuitive design, Corteza One increases productivity and ease of access to all IT resources.
# Setup
Copy `.env.example` to `.env` and make proper modifications for your local environment.
An access to a (local) instance of MySQL must be available.
Configure access to your database with `DB_DSN`.
The database will be populated with migrations at the start of each service. You don't need to pre-populate the database, just make sure that your permissions include CREATE and ALTER capabilities.
# Running in local environment for development
Everything should be set and ready to run with `make realize`. This utilizes realize
tool that monitors codebase for changes and restarts api http server for every file change. It is not 100% so it needs help (manual restart) in certain cases (new files added, changes in non .go files etc..)
# Documentation:
You can find more documentation about Corteza CLI, setup, authentication and API endpoints under `/docs`.
# Documentation
You can find more documentation about Corteza CLI, setup, deployment, authentication
in [corteza-docs](https://github.com/cortezaproject/corteza-docs) GitHub repository.
-81
View File
@@ -1,81 +0,0 @@
# Corteza Command Line Interface
## General
You can choose from one of the four (4) app/service CLI entrypoints:
- system (`corteza-server-system`)
- messaging (`corteza-server-messaging`)
- compose (`corteza-server-compose`)
- all-in-one monolith (`corteza-server`)
When system is build into a all-in-one binary or image,
app-specific commands can be accessed under a sub-command with the
same name as the app.
## Config
Command and application behaviour can be adjusted using environmental
variables. Defaults that are pre-set internally are optimized for production mode.
Make sure you read `/.env.example` for all the available options.
Note that defaults shown under `--help` are overridden by value from the accompanying
environmental variable.
## How to run:
### Compile source files and run with `go run`
Source entrypoints can be found under `cmd/`:
```sh
go run cmd/system/*.go [commands and flags]
```
### Docker or Docker Compose
Docker images are built with handy presets for
`ENTRYPOINT` and `CMD`. By default, `CMD` is set to `serve-api`.
See docker manual for more info.
```sh
docker exec -it -rm corteza-server-system [commands and flags]
```
## Base commands:
These commands are accessible from the base level (never
wrapped under an app-sub-command) and always affect all apps.
### `provision`
Command `provision` Wraps 2 sub-commands:
- `access-control-rules`
Reset access control rules for Everyone and Administrator roles.
- `migrate-database`
Run database migration scripts
Both these commands are executed when you run `serve-api` command,
after database is connected and before initialization. This behaviour can
be changed with env variables.
## System specific commands & sub-commands
| Command | Subcommand | |
| --- | --- | --- |
| auth | auto-discovery | Auto discovers new OIDC client
| auth | jwt | Generates new JWT for a user
| auth | test-notifications | Sends samples of all authentication notification to receipient
| roles | useradd | Add user to role
| settings | auto-configure | Run autoconfiguration
| settings | delete | Set value (raw JSON) for a specific key
| settings | get | Get value (raw JSON) for a specific key
| settings | import | Import settings as JSON from stdin or file
| settings | list | List all
| settings | set | Set value (raw JSON) for a specific key
| users | add | Add new user
| users | list | List users
| users | password | Change user's password
See help (`--help`) under each (sub) command for details about additional flags and arguments.
-80
View File
@@ -1,80 +0,0 @@
# Authentication
If you are not already familiar with it, please read documentation about [Corteza Command Line Interface](CLI.md).
Corteza support a fixed set of standard OAuth 2 authentication providers
(facebook, gplus, github and linkedin) and a arbitrary number of custom
issuers (over OpenID Connect).
# Available settings
Settings for external providers are stored under keys
`auth.external.providers.<provider>.<prop>` and
`auth.external.providers.openid-connect.<provider>.<prop>`.
Prop is one of: `key`, `secret`, `enabled`. OIDC settings also have `issuer` prop.
Example settings (`settings list --prefix=auth.external`):
```
auth.external.callback-endpoint "https://your-corteza-system-api-backend/auth/external/%s/callback"
auth.external.enabled true
auth.external.providers.facebook.enabled true
auth.external.providers.facebook.key "24226007270326"
auth.external.providers.facebook.secret "7vtfXx213cfc125804a226afcae777fe47"
auth.external.providers.gplus true
auth.external.providers.gplus.enabled true
auth.external.providers.gplus.key "10629818561-7a8vr0avs47dqic43h2lkrurhr.apps.googleusercontent.com"
auth.external.providers.gplus.secret "bkHmIFdk2YvtfXx"
auth.external.providers.github.enabled false
auth.external.providers.github.key null
auth.external.providers.github.secret null
auth.external.providers.linkedin.enabled false
auth.external.providers.linkedin.key null
auth.external.providers.linkedin.secret null
auth.external.providers.openid-connect.corteza-iam.enabled true
auth.external.providers.openid-connect.corteza-iam.key "tXM2ouiovowzGabk"
auth.external.providers.openid-connect.corteza-iam.issuer "https://satosa.didmos.latest.crust.tech"
auth.external.providers.openid-connect.corteza-iam.secret "e1d68bfd7718468ba8fd36131f5176b1"
auth.external.redirect-url "http://system.api.local.crust.tech:3002/auth/external/%s/callback"
auth.external.session-store-secret "fCVFSRWjVEcoYuhXSf3f6zVWO1p38XEWz2yS8WH7wKDbvpxFrZq7zlEuiUTvk4QF"
```
# Changing settings
Authentication settings can be changed in the administration (via the API) and with cli
command (`system settings set <key> <value>`). Please bare in mind that values passed
to CLI tool must always be in raw JSON format.
Changing values requires system service restart.
On startup, you should see log entries similar to these:
```
initializing external authentication providers (3)
external authentication provider "facebook" added
external authentication provider "gplus" added
external authentication provider "openid-connect.corteza-iam" added
```
# OIDC Auto discovery/configuration
Corteza CLI comes with auto-discovery tool:
```bash
external-auth auto-discovery name url
```
```bash
external-auth auto-discovery corteza-iam https://satosa.didmos.crust.example.tld
```
This will autodiscover and autoconfigure new OIDC provider.
If entry with this name already exists it will override it.
Please note that this provider is disabled by default.
To enable it, run:
```bash
settings key auth.external.providers.openid-connect.corteza-iam.enabled true
```
Changing values requires system service restart.
-50
View File
@@ -1,50 +0,0 @@
# Corteza Setup
If you are not already familiar with it, please read documentation about [Corteza Command Line Interface](CLI.md).
## First steps
Corteza will pre-initialize itself to allow you to access all of it's features as quickly as possible.
Internal authentication enabled, sign-up without email confirmation (in case you do not have your SMTP configured just
yet)...
## Configuring system
### Configuring authentication
Review your current (auto-configure) settings with `settings list`:
```
auth.external.enabled false
auth.external.redirect-url "http://system.api.local.crust.tech/auth/external/%s/callback"
auth.external.session-store-secret "PBVta4xKfQ0LIQEOtycxXqZZrGbZdTCuF4hw1cxrly1YA2AY5uO8a0SyY4Tbd1bk"
auth.external.session-store-secure false
auth.internal.enabled true
auth.internal.password-reset.enabled true
auth.internal.signup-email-confirmation-required false
auth.internal.signup.enabled true
auth.mail.from-address "change-me@example.tld"
auth.mail.from-name "Corteza Team"
```
| Key | Description |
| ---- | ---- |
| auth.external.enabled | Enable external authentication, see [ExternalAuth.md](ExternalAuth.md) for details
| auth.external.redirect-url | Where to redirect after successful external authentication. This is the URL that you usually need to insert into your provider's auth app configuration page
| auth.external.session-store-secret | Keep session values secret
| auth.external.session-store-secure | Secure sessino store (set to false if not using TLS/HTTPS)
| auth.internal.enabled | Enable/disable internal authentication (will users be able to use Corteza username and password to login)
| auth.internal.password-reset.enabled | Enable password reset
| auth.internal.signup-email-confirmation-required | Is email confirmation required on sign-up.
| auth.internal.signup.enabled | Is sign-up enabled.
| auth.mail.from-address | Who (email) is sending auth emails (password reset, email confirmation)
| auth.mail.from-name | Who (name) is sending auth emails (password reset, email confirmation)
## Configuring messaging
_To be implemented_
## Configuring corteza
_To be implemented_