Skip to content

Commit bdcab2a

Browse files
Add encryption password field and change scope to api
1 parent 79256e1 commit bdcab2a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

_docs/deployment-instructions.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
You will need the following to run this application:
66
1. Server running MySQL version 14.14
7-
1. Java version 1.8
7+
1. Server running Java version 1.8
88

99
## Installation
1010

@@ -16,7 +16,7 @@ mysql -u USERNAME -h HOSTNAME -P PORT -p -e "create database groupthree"
1616

1717
## Configure GitLab OAuth2
1818

19-
Follow the instructions provided on this [website](https://docs.gitlab.com/ee/integration/oauth_provider.html). Set the callback URL to `http://{DOMAIN_NAME}/login/oauth2/code/gitlab`, replacing {DOMAIN_NAME} with the appropriate domain name.
19+
Follow the instructions provided on this [website](https://docs.gitlab.com/ee/integration/oauth_provider.html). Set the callback URL to `http://{DOMAIN_NAME}/login/oauth2/code/gitlab`, replacing {DOMAIN_NAME} with the appropriate domain name. Tick the `api` scope box.
2020

2121

2222
## Configure application.yml
@@ -30,8 +30,8 @@ Create a new file `application.yml` with the following contents, replacing {} wi
3030
`{PASSWORD}` = Password for the sql server
3131
`{CLIENT_ID}` = GitLab Application Id
3232
`{CLIENT_SECRET}` = GitLab Secret
33-
`{PORT_NUMBER}` = Port you would like the application to run on
34-
33+
`{PORT_NUMBER}` = Port you would like the application to run on (Note: Make sure this is different to the port you used for the MySQL database)
34+
`{ENCRYPTION_PASSWORD}` = The password used to encrypt the user access tokens with
3535

3636
```yaml
3737
spring:
@@ -61,20 +61,24 @@ spring:
6161
authorization-grant-type: authorization_code
6262
# Below property should not be changed
6363
redirect-uri-template: '{baseUrl}/login/oauth2/code/{registrationId}'
64-
scope: openid
64+
scope: api
6565
clientName: GitLab
6666
provider:
6767
gitlab:
6868
authorization-uri: https://gitlab.com/oauth/authorize
6969
token-uri: https://gitlab.com/oauth/token
7070
user-info-uri: https://gitlab.com/api/v4/user
7171
jwk-set-uri: https://gitlab.com/oauth/discovery/keys
72+
user-name-attribute: name
7273
server:
7374
port: {PORT_NUMBER}
75+
jasypt:
76+
encryptor:
77+
password: {ENCRYPTION_PASSWORD}
7478
```
7579
7680
## Run the application
7781
7882
```bash
79-
java -jar /path/to/co2015-1819-group-03-0.0.1-SNAPSHOT.war --spring.config.location=file:relative/path/to/application.yml
83+
java -jar /path/to/co2015-1819-group-03-0.0.2-SNAPSHOT.war --spring.config.location=file:relative/path/to/application.yml
8084
```

0 commit comments

Comments
 (0)