-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from buggregator/feature/new-sections
Adds new sections
- Loading branch information
Showing
15 changed files
with
381 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Configuration — External Database | ||
|
||
Buggregator supports the configuration of external databases for storing events, allows for greater flexibility and | ||
scalability in handling event data. | ||
|
||
## Configuration Overview | ||
|
||
Events in Buggregator are traditionally stored in local in-memory storage by default. After release 1.7.0, users can | ||
opt to store events in external databases like **MongoDB** or **PostgreSQL**. This configuration is managed via | ||
environment variables, enabling easy integration and setup. | ||
|
||
Buggregator supports the following databases: | ||
|
||
- PostgreSQL | ||
- MongoDB | ||
|
||
To use an external database, set the `PERSISTENCE_DRIVER` environment variable to `database` for PostgreSQL or `mongodb` | ||
for MongoDB. | ||
|
||
## PostgreSQL | ||
|
||
Provide the connection details specific to the type of database you are using. | ||
|
||
```dotenv | ||
PERSISTENCE_DRIVER=database | ||
DB_DRIVER=pgsql | ||
DB_DATABASE=buggregator | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=5432 | ||
DB_USERNAME=homestead | ||
DB_PASSWORD=secret | ||
``` | ||
|
||
### Ensuring the Database is Ready | ||
|
||
Before starting Buggregator, make sure that the database is already created and accessible as specified in your | ||
environment settings. | ||
|
||
> **Warning**: Buggregator does not create the database itself; it only creates the tables within the existing | ||
> database. | ||
### Running Migrations | ||
|
||
Buggregator automatically runs migrations when it starts. However, if you encounter any issues with the automatic | ||
migrations, or if they were not executed for some reason, you can run them manually: | ||
|
||
1. **Connect to the Buggregator container:** | ||
Depending on your setup, you might use Docker, Kubernetes, or any other container service. Use the appropriate | ||
command to access the shell of the running Buggregator container. | ||
|
||
For example, if you are using Docker, you can use the following command: | ||
|
||
```bash | ||
docker exec -it buggregator /bin/bash | ||
``` | ||
|
||
Replace `buggregator` with the name of your Buggregator container. | ||
|
||
If you are using Kubernetes, you can use the following command: | ||
|
||
```bash | ||
kubectl exec -it buggregator -- /bin/bash | ||
``` | ||
|
||
Replace `buggregator` with the name of your Buggregator pod. | ||
|
||
|
||
2. **Run the migration command:** | ||
Within the Buggregator container, execute the following command to force the migrations: | ||
|
||
```bash | ||
php app.php migrate --force | ||
``` | ||
|
||
This command forcefully runs the migrations regardless of the current state, ensuring that all necessary tables are | ||
properly set up in the database. | ||
|
||
## MongoDB | ||
|
||
Provide the connection details specific to the type of database you are using. | ||
|
||
```dotenv | ||
PERSISTENCE_DRIVER=mongodb | ||
MONGODB_CONNECTION=mongodb://127.0.0.1:27017 | ||
MONGODB_DATABASE=buggregator | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Configuration — Single Sign-On (SSO) | ||
|
||
With the release of version 1.7.0, Buggregator now supports Single Sign-On (SSO) using [Auth0](https://auth0.com/). This | ||
integration allows users to authenticate with external identity providers supported by Auth0, providing a secure and | ||
seamless sign-in experience. | ||
|
||
![image](https://github.com/buggregator/server/assets/773481/3bc5dd4b-b8ac-4e2c-a9c0-5707dd053d0b) | ||
|
||
By configuring SSO, you can streamline the authentication process and enhance the security of user management within | ||
your application. | ||
|
||
## Prerequisites | ||
|
||
To configure SSO in Buggregator, you must have an [auth0.com](https://auth0.com/) account. If you do not have one, you | ||
can sign up for free. | ||
|
||
## Configuration Steps | ||
|
||
To enable SSO, follow these steps: | ||
|
||
1. **Enable Authentication**: Set the environment variable `AUTH_ENABLED` to `true` to enable authentication features in | ||
your application. | ||
|
||
2. **Create an Auth0 Application**: Log in to your Auth0 account and create a new "Regular Web | ||
Application". After creating the application, you will receive a `Domain`, `Client ID` and `Client Secret` that you | ||
will need to use in the next steps. | ||
|
||
3. **Configure Auth0 Settings**: Set up the following environment variables with the appropriate values from your Auth0 | ||
application: | ||
|
||
- `AUTH_PROVIDER_URL`: The URL of your app domain, e.g., `https://<domain>.auth0.com` | ||
- `AUTH_CLIENT_ID`: The client ID provided by app. | ||
- `AUTH_CLIENT_SECRET`: The client secret provided by app. | ||
- `AUTH_CALLBACK_URL`: The callback URL that app will redirect to after authentication, | ||
e.g., `http://buggregator.server/auth/sso/callback`. Where `buggregator.server` is the domain of your Buggregator | ||
server. | ||
- `AUTH_SCOPES`: The scopes for which permissions are granted, typically include `openid`, `email`, and `profile`. | ||
|
||
4. **Set Up Callback URL**: In your Auth0 application settings, configure the callback URL to point to | ||
the `http://buggregator.server/auth/sso/callback` endpoint. Where `buggregator.server` is the domain of your | ||
Buggregator server. | ||
|
||
Resultant environment variables should look like this: | ||
|
||
```dotenv | ||
AUTH_ENABLED=true | ||
AUTH_PROVIDER_URL=https://<domain>.auth0.com | ||
AUTH_CLIENT_ID=xxx | ||
AUTH_CLIENT_SECRET=xxx | ||
AUTH_CALLBACK_URL=http://buggregator.server/auth/sso/callback | ||
AUTH_SCOPES=openid,email,profile | ||
``` | ||
|
||
### Verifying the Configuration | ||
|
||
After configuring the environment variables, start your Buggregator server. You should now see Login page with the | ||
option to sign in using Auth0. If set up correctly, clicking this option will redirect you to the Auth0 authentication | ||
page where users can enter their credentials. | ||
|
||
After successful authentication, users will be redirected back to the Buggregator application and logged in. And you | ||
will see the user's profile information in the bottom left corner of the application. | ||
|
||
![image](https://github.com/buggregator/frontend/assets/773481/6f996c5e-f43a-4f5e-8da4-71f83110c7ba) | ||
|
||
### Troubleshooting | ||
|
||
If you encounter issues during the authentication process, ensure that: | ||
|
||
- All environment variables are correctly set without any typos. | ||
- The callback URL in your Auth0 configuration matches the `AUTH_CALLBACK_URL` you specified. | ||
- Your Auth0 account has access to the scopes specified in `AUTH_SCOPES`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ Centrifugo. | |
|
||
## Server requirements | ||
|
||
1. PHP 8.1 | ||
1. Minimum PHP version: 8.2 | ||
|
||
## Installation | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.