Skip to content

Commit 3ffd52a

Browse files
committed
refactor: sql/OIDC WIP README
1 parent e554cb0 commit 3ffd52a

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Prerequisites
2+
3+
For those of us that don't use postgres every day:
4+
5+
1. You will need to have access to a postgres user that can create roles and views etc.
6+
2. You will probably want that postgres user to have easy access to your file system so you can run this script and tweak it if need be.
7+
8+
That means.
9+
10+
1. You probably want to have a postgres user with the same name as your linux or mac username.
11+
12+
So:
13+
14+
```bash
15+
sudo -u postgres psql
16+
```
17+
18+
```sql
19+
CREATE ROLE <YOURLINUXUSERNAME> WITH LOGIN SUPERUSER CREATEDB CREATEROLE;
20+
```
21+
22+
This step is not required but
23+
24+
```sql
25+
CREATE DATABASE <YOURLINUXUSERNAME> OWNER <YOURLINUXUSERNAME>;
26+
```
27+
28+
now quit with `\q`
29+
30+
now when you:
31+
32+
```bash
33+
psql
34+
```
35+
36+
you will be logged in and have access to your normal home directory.
37+
38+
now connect to the OBP database you want e.g.:
39+
40+
```sql
41+
\c sandbox
42+
```
43+
44+
now run the script from within the psql shell:
45+
46+
```sql
47+
\i ~/Documents/workspace_2024/OBP-API-C/OBP-API/obp-api/src/main/scripts/sql/create_oidc_user_and_views.sql
48+
```
49+
50+
or run it from the linux terminal specifying the database
51+
52+
```bash
53+
psql -d sandbox -f ~/Documents/workspace_2024/OBP-API-C/OBP-API/obp-api/src/main/scripts/sql/create_oidc_user_and_views.sql
54+
```
55+
56+
either way, check the output of the script carefully.

obp-api/src/main/scripts/sql/OIDC/give_read_access_to_obp_users.sql

Whitespace-only changes.

obp-api/src/main/scripts/sql/OIDC/give_read_access_to_obp_users_and_write_access_to_obp_consumers.sql

Whitespace-only changes.

0 commit comments

Comments
 (0)