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

feat(jans-config-api): rectified test properties file #1222

Merged
merged 5 commits into from
Apr 19, 2022
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#LOCAL
karate.test.url=http://localhost
karate.test.port=8080
#karate.test.url=http://localhost
#karate.test.port=8080
#karate.test.url=https://jenkins-config-api.gluu.org/jans-config-api
#karate.test.port=443
#karate.test.url=https://jenkins-config-api.gluu.org
karate.test.url=${test.server}
Original file line number Diff line number Diff line change
@@ -1,75 +1,8 @@
#LOCAL
test.scopes=https://jans.io/oauth/config/acrs.readonly https://jans.io/oauth/config/acrs.write https://jans.io/oauth/config/attributes.readonly https://jans.io/oauth/config/attributes.write https://jans.io/oauth/config/attributes.delete https://jans.io/oauth/config/cache.readonly https://jans.io/oauth/config/cache.write https://jans.io/oauth/config/openid/clients.readonly https://jans.io/oauth/config/openid/clients.write https://jans.io/oauth/config/openid/clients.delete https://jans.io/oauth/jans-auth-server/config/properties.readonly https://jans.io/oauth/jans-auth-server/config/properties.write https://jans.io/oauth/config/smtp.readonly https://jans.io/oauth/config/smtp.write https://jans.io/oauth/config/smtp.delete https://jans.io/oauth/config/database/couchbase.readonly https://jans.io/oauth/config/database/couchbase.write https://jans.io/oauth/config/database/couchbase.delete https://jans.io/oauth/config/scripts.readonly https://jans.io/oauth/config/scripts.write https://jans.io/oauth/config/scripts.delete https://jans.io/oauth/config/fido2.readonly https://jans.io/oauth/config/fido2.write https://jans.io/oauth/config/jwks.readonly https://jans.io/oauth/config/jwks.write https://jans.io/oauth/config/database/ldap.readonly https://jans.io/oauth/config/database/ldap.write https://jans.io/oauth/config/database/ldap.delete https://jans.io/oauth/config/logging.readonly https://jans.io/oauth/config/logging.write https://jans.io/oauth/config/scopes.readonly https://jans.io/oauth/config/scopes.write https://jans.io/oauth/config/scopes.delete https://jans.io/oauth/config/uma/resources.readonly https://jans.io/oauth/config/uma/resources.write https://jans.io/oauth/config/uma/resources.delete https://jans.io/oauth/config/database/sql.readonly https://jans.io/oauth/config/database/sql.write https://jans.io/oauth/config/database/sql.delete https://jans.io/oauth/config/stats.readonly jans_stat https://jans.io/scim/users.read https://jans.io/scim/users.write https://jans.io/oauth/config/scim/users.read https://jans.io/oauth/config/scim/users.write https://jans.io/scim/config.readonly https://jans.io/scim/config.write https://jans.io/oauth/config/organization.readonly https://jans.io/oauth/config/organization.write https://jans.io/oauth/config/user.readonly https://jans.io/oauth/config/user.write https://jans.io/oauth/config/user.delete
test.scopes=${test.scopes}

# Test env Setting
#token.endpoint=https://jenkins-config-api.gluu.org/jans-auth/restv1/token
#token.grant.type=client_credentials
#test.client.id=1801.f35446a2-b9cb-40af-a26e-c1221f3ca0cb
#test.client.secret=lye8TNJmNpze
#test.issuer=https://jenkins-config-api.gluu.org

# Local Setting
#pujavs.jans.server
#token.endpoint=https://pujavs.jans.server/jans-auth/restv1/token
#token.grant.type=client_credentials
#test.client.id=1802.9dcd98ad-fe2c-4fd9-b717-d9436d9f2009
#test.client.secret=test1234
#test.issuer=https://pujavs.jans.server

# pujavs.jans.server2
#token.endpoint=https://pujavs.jans.server2/jans-auth/restv1/token
#token.grant.type=client_credentials
#test.client.id=1801.86d83471-fe91-4522-ac47-a256956c0f23
#test.client.secret=wndq7RoRnyqm
#test.issuer=https:// pujavs.jans.server2

# pujavs.jans.server5
#token.endpoint=https://pujavs.jans.server5/jans-auth/restv1/token
#token.grant.type=client_credentials
#test.client.id=1800.0f2aeab1-efee-4b89-a7f1-570c15a68ff3
#test.client.secret=fxa2iV1Oi0HS
#test.issuer=https:// pujavs.jans.server5


# pujavs.jans.server3
#token.endpoint=https://pujavs.jans.server2/jans-auth/restv1/token
#token.grant.type=client_credentials
#test.client.id=1801.e0396ed5-055d-4986-9afc-342373995f0e
#test.client.secret=Dk3RaLUYSdJn
#test.issuer=https:// pujavs.jans.server3

# jans.server1
#token.endpoint=https://jans.server1/jans-auth/restv1/token
#token.grant.type=client_credentials
#test.client.id=1800.d166622d-6771-4d5a-8fab-555566b20091
#test.client.secret=slkveBOhwJn5
#test.issuer=https://jans.server1

# jans.server2
#token.endpoint=https://jans.server2/jans-auth/restv1/token
#token.grant.type=client_credentials
#test.client.id=1800.5ad89818-e1c6-45ba-873d-d549dfad67a4
#test.client.secret=9ZW2HaDakqD4
#test.issuer=https://jans.server2

# jans.server3
#token.endpoint=https://jans.server3/jans-auth/restv1/token
#token.grant.type=client_credentials
#test.client.id=1800.1adcb34a-e1a5-4b4d-86d0-f92c62aab52b
#test.client.secret=aDiH4IuuGddZ
#test.issuer=https://jans.server3

# jans.server4
#token.endpoint=https://jans.server4/jans-auth/restv1/token
#token.grant.type=client_credentials
#test.client.id=1800.7e78990f-fdae-40e9-9433-4fe20645851d
#test.client.secret=GfUrIapPM71X
#test.issuer=https://jans.server4


# jans.server
token.endpoint=https://jans.server/jans-auth/restv1/token
token.grant.type=client_credentials
test.client.id=1800.5cfac798-9a5d-4a92-8efe-4cecc4f0c196
test.client.secret=SSj633EttZdV
test.issuer=https://jans.server
token.endpoint=${token.endpoint}
token.grant.type=${token.grant.type}
test.client.id=${test.client.id}
test.client.secret=${test.client.secret}
test.issuer=${test.issuer}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class ConfigBaseResource extends BaseResource {

@Inject
Logger log;
Logger logger;

@Inject
ConfigurationFactory configurationFactory;
Expand All @@ -34,7 +34,7 @@ public class ConfigBaseResource extends BaseResource {
protected static final int DEFAULT_MAX_COUNT = ApiConstants.DEFAULT_MAX_COUNT;

protected int getMaxCount() {
log.trace(" MaxCount details - ApiAppConfiguration.MaxCount():{}, DEFAULT_MAX_COUNT:{} ",
logger.trace(" MaxCount details - ApiAppConfiguration.MaxCount():{}, DEFAULT_MAX_COUNT:{} ",
configurationFactory.getApiAppConfiguration().getMaxCount(), DEFAULT_MAX_COUNT);
return (configurationFactory.getApiAppConfiguration().getMaxCount() > 0
? configurationFactory.getApiAppConfiguration().getMaxCount()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Response getOrganization() {
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
@ProtectedApi(scopes = { ApiAccessConstants.ORG_CONFIG_WRITE_ACCESS })
public Response patchOrganization(@NotNull String pathString) throws JsonPatchException, IOException {
log.trace("Organization patch request - pathString:{} ", pathString);
logger.trace("Organization patch request - pathString:{} ", pathString);
GluuOrganization organization = organizationService.getOrganization();
organization = Jackson.applyPatch(pathString, organization);
organizationService.updateOrganization(organization);
Expand Down