Skip to content

Commit

Permalink
chore: disable redis more
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Feb 16, 2023
1 parent dbaa6ef commit ce657b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions services/api/src/apolloServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const {
} = require('./util/auth');
const { sqlClientPool } = require('./clients/sqlClient');
const esClient = require('./clients/esClient');
const redisClient = require('./clients/redisClient');
// const redisClient = require('./clients/redisClient');
const { getKeycloakAdminClient } = require('./clients/keycloak-admin');
const { logger } = require('./loggers/logger');
const { userActivityLogger } = require('./loggers/userActivityLogger');
Expand Down Expand Up @@ -117,7 +117,7 @@ const apolloServer = new ApolloServer({
sqlClientPool,
keycloakAdminClient,
esClient,
redisClient
// redisClient
};

return {
Expand Down Expand Up @@ -163,7 +163,7 @@ const apolloServer = new ApolloServer({
sqlClientPool,
keycloakAdminClient,
esClient,
redisClient
// redisClient
};

return {
Expand Down
2 changes: 0 additions & 2 deletions services/api/src/util/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ export const keycloakHasPermission = (grant, requestCache, modelClients) => {
};


logger.info(`A ${JSON.stringify(grant.access_token.token)}`)

const usersAttribute = R.prop('users', attributes);
if (usersAttribute && usersAttribute.length) {
claims = {
Expand Down
3 changes: 0 additions & 3 deletions services/keycloak/startup-scripts/00-configure-lagoon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1962,12 +1962,9 @@ EOF
function add_group_project_token_mapper {
CLIENT_ID=$(/opt/jboss/keycloak/bin/kcadm.sh get -r lagoon clients?clientId=api --config $CONFIG_PATH | jq -r '.[0]["id"]')
ui_client_id=$(/opt/jboss/keycloak/bin/kcadm.sh get -r lagoon clients?clientId=lagoon-ui --config $CONFIG_PATH | jq -r '.[0]["id"]')
echo "AA $ui_client_id"
group_project_token_mappers=$(/opt/jboss/keycloak/bin/kcadm.sh get -r lagoon clients/$ui_client_id/protocol-mappers/models --config $CONFIG_PATH)
echo "AA $group_project_token_mappers"
old_mapper_id=$(echo $group_project_token_mappers | jq -r '.[] | select(.name=="group_project_role_ids") | .id')

echo "AA $old_mapper_id"
if [ "$old_mapper_id" != "" ]; then
echo "group_project_role_ids token mapper already configured"
return 0
Expand Down

0 comments on commit ce657b5

Please sign in to comment.