Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicated auth sample configs #764

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ build/
.vscode/

## jte ##
/api-rest/jte-classes/**
/jte-classes/**
107 changes: 0 additions & 107 deletions auth/auth-sample.json

This file was deleted.

47 changes: 0 additions & 47 deletions auth/auth-sample.yml

This file was deleted.

43 changes: 32 additions & 11 deletions auth/src/main/resources/auth-sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,50 @@
"method": "*"
}
],
"account": [
"users": [
{
"appId": "admin",
"credential": "0192023A7BBD73250516F069DF18B500",
"salt": 123,
"role": [
"username": "admin",
"password": "0192023A7BBD73250516F069DF18B500",
"roles": [
"role1",
"role2"
]
},
{
"appId": "root",
"credential": 23456,
"role": [
"username": "root",
"password": 23456,
"roles": [
"role1"
]
},
{
"appId": "tom",
"credential": 32113,
"role": [
"username": "tom",
"password": 32113,
"roles": [
"role3"
]
}
],
"apiKeys": [
{
"key": "apikey1",
"roles": [
"admin"
],
"active": true
},
{
"key": "apikey2",
"roles": [
"admin"
]
},
{
"key": "apiKey3",
"roles": [
"user"
],
"active": true
}
]
}
59 changes: 28 additions & 31 deletions auth/src/main/resources/auth-sample.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: db2rest-security

resourceRoles:
- resource: "/api/v2/host"
- resource: "/v1/rdbms/pgdb/actor/**"
method: post
roles:
- role2
Expand All @@ -12,39 +13,35 @@ resourceRoles:
- role2
- role3
- role4
- resource: "/api/v2/host"
method: delete
roles:
- role2
- role3
- role4
- resource: "/api/v2/source3/*"
method: get
roles:
- role1
- role2
- resource: "/api/mi/**"
method: '*'
roles:
- role2


excludedResources:
- resource: "/api/v1/source3"
- resource: "/v1/rdbms/**"
method: get
- resource: "/api/v3/host"
- resource: "/v1/rdbms/pgdb/factor"
method: post
- resource: "/api/v3/book"
method: '*'
- resource: "/v1/rdbms/**"
method: put
- resource: "/v1/rdbms/**"
method: delete

users:
- username: admin
password: admin
roles: [role1,role6]
- username: root
password: 23456
roles: [role1,role4]
- username: tom
password: 32113
roles: [role3]

account:
- appId: admin
credential: 0192023A7BBD73250516F069DF18B500
salt: 123
role: [role1,role2]
- appId: root
credential: 23456
role: [role1]
- appId: tom
credential: 32113
role: [role3]
apiKeys:
- key: apikey1
roles: [admin]
active: true
- key: apikey2
roles: [admin]
- key: apiKey3
roles: [user]
active: true
Loading