-
Notifications
You must be signed in to change notification settings - Fork 51
feat: SSO support and clientcredentials based switchig for single sign on feature #1183
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
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
Signed-off-by: bhavanakarwade <[email protected]>
* fix: added api param validations Signed-off-by: bhavanakarwade <[email protected]> * fix: removed unnecessary validations Signed-off-by: bhavanakarwade <[email protected]> * fix:resolved validations issue Signed-off-by: bhavanakarwade <[email protected]> * added comment on function for understanding Signed-off-by: bhavanakarwade <[email protected]> * fix: resolve orgid validations Signed-off-by: bhavanakarwade <[email protected]> * fix: added response message Signed-off-by: bhavanakarwade <[email protected]> * fix: added space in response messages Signed-off-by: bhavanakarwade <[email protected]> --------- Signed-off-by: bhavanakarwade <[email protected]>
Signed-off-by: pallavighule <[email protected]>
* fix: removed prisma commands in build stage Signed-off-by: [email protected] <[email protected]> * feat: create yml file for all services Signed-off-by: [email protected] <[email protected]> * Updated Dockerfiles Signed-off-by: [email protected] <[email protected]> * Updated yml to push docker images Signed-off-by: [email protected] <[email protected]> * updated yml files Signed-off-by: [email protected] <[email protected]> --------- Signed-off-by: [email protected] <[email protected]>
* fix: used single yml file using matrix instead of multiple files Signed-off-by: [email protected] <[email protected]> * fix: renamed yml file to cicd.yml Signed-off-by: [email protected] <[email protected]> * fix: renamed yml file Signed-off-by: [email protected] <[email protected]> * fix: renamed yml file Signed-off-by: [email protected] <[email protected]> * chore: removed id-token and attestations Signed-off-by: [email protected] <[email protected]> --------- Signed-off-by: [email protected] <[email protected]>
* chore: add aws into monorepo Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * chore: update tsconfig Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * refactor:tsconfig.build.json file Signed-off-by: Tipu_Singh <[email protected]> * refactor: remove redundant .nvmrc file Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> --------- Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> Signed-off-by: Tipu_Singh <[email protected]> Co-authored-by: Tipu_Singh <[email protected]>
Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
* refactor: merge nats-interceptor into common Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * refactor: merge repsonses lib into common Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * refactor: create common function to handle errors Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * chore: add todo Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * fix: remove missed image service Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * fix: create separate function to handle common error Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * chore: add comment for the purpose of the functions Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * chore: update function comments Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> --------- Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
* refactor: merge nats-interceptor into common Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * refactor: merge repsonses lib into common Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * refactor: create common function to handle errors Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * chore: add todo Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * refactor: create common package in libs Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * fix: remove missed image service Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> * refactor: common service Signed-off-by: Sai Ranjit Tummalapalli <[email protected]> --------- Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
* wip: support nested attributes while creating schema Signed-off-by: bhavanakarwade <[email protected]> * wip: aligned issuance functionality with nested attributes structure Signed-off-by: bhavanakarwade <[email protected]> * refactor: modify csv to json function Signed-off-by: bhavanakarwade <[email protected]> * fix: formatting changes Signed-off-by: bhavanakarwade <[email protected]> * fix: resolved sonar cloud issue Signed-off-by: bhavanakarwade <[email protected]> * fix: security hotspot issue Signed-off-by: bhavanakarwade <[email protected]> * feat: added schema builder function Signed-off-by: bhavanakarwade <[email protected]> * fix: resolved issue Signed-off-by: bhavanakarwade <[email protected]> * refactor: modify extract attributes function Signed-off-by: bhavanakarwade <[email protected]> * fix: destructured objects Signed-off-by: bhavanakarwade <[email protected]> * feat: added description property Signed-off-by: bhavanakarwade <[email protected]> --------- Signed-off-by: bhavanakarwade <[email protected]>
* wip: support nested attributes while creating schema Signed-off-by: bhavanakarwade <[email protected]> * wip: aligned issuance functionality with nested attributes structure Signed-off-by: bhavanakarwade <[email protected]> * refactor: modify csv to json function Signed-off-by: bhavanakarwade <[email protected]> * fix: formatting changes Signed-off-by: bhavanakarwade <[email protected]> * fix: resolved sonar cloud issue Signed-off-by: bhavanakarwade <[email protected]> * fix: security hotspot issue Signed-off-by: bhavanakarwade <[email protected]> * feat: added schema builder function Signed-off-by: bhavanakarwade <[email protected]> * fix: resolved issue Signed-off-by: bhavanakarwade <[email protected]> * refactor: modify extract attributes function Signed-off-by: bhavanakarwade <[email protected]> * fix: destructured objects Signed-off-by: bhavanakarwade <[email protected]> * feat: added description property Signed-off-by: bhavanakarwade <[email protected]> * fix: added validations for schema type Signed-off-by: bhavanakarwade <[email protected]> * formatted enum file Signed-off-by: bhavanakarwade <[email protected]> * chore: added enum for indy schema data type Signed-off-by: bhavanakarwade <[email protected]> --------- Signed-off-by: bhavanakarwade <[email protected]>
…te and city (#1180) * refactor: update organization API to support updation of country, state and city Signed-off-by: pranalidhanavade <[email protected]> * resolved sonarlint issues Signed-off-by: pranalidhanavade <[email protected]> * resolved sonarlint issues Signed-off-by: pranalidhanavade <[email protected]> --------- Signed-off-by: pranalidhanavade <[email protected]>
Signed-off-by: pranalidhanavade <[email protected]>
Signed-off-by: Krishna Waske <[email protected]>
Signed-off-by: Krishna Waske <[email protected]>
Signed-off-by: Krishna Waske <[email protected]>
Signed-off-by: Krishna Waske <[email protected]>
const encryptedToken = CryptoJS.AES.encrypt(JSON.stringify(clientCredential), process.env.CRYPTO_PRIVATE_KEY).toString(); | ||
const command = `${process.cwd()}/${scriptPath} ${dbUrl}`; | ||
|
||
const { stdout, stderr } = await execPromise(command); |
Check warning
Code scanning / CodeQL
Shell command built from environment values Medium
absolute path
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the issue, we will replace the use of execPromise
with execFilePromise
, which allows us to pass the command and its arguments separately. This approach avoids shell interpretation of the arguments, mitigating the risk of shell injection. Specifically:
- Extract the script path and arguments into separate variables.
- Use
execFilePromise
to execute the script, passing the script path as the command and the arguments as an array. - Ensure that all inputs (e.g.,
scriptPath
,dbUrl
) are validated or sanitized before use.
The changes will be applied to both the importGeoLocationMasterData
and updateClientCredential
functions.
-
Copy modified lines R404-R405 -
Copy modified line R407 -
Copy modified lines R437-R438 -
Copy modified line R440
@@ -403,5 +403,6 @@ | ||
|
||
const command = `${process.cwd()}/${scriptPath} ${dbUrl}`; | ||
const scriptFullPath = `${process.cwd()}/${scriptPath}`; | ||
const args = [dbUrl]; | ||
|
||
const { stdout, stderr } = await execPromise(command); | ||
const { stdout, stderr } = await execPromise(scriptFullPath, args); | ||
|
||
@@ -435,5 +436,6 @@ | ||
|
||
const command = `${process.cwd()}/${scriptPath} ${dbUrl} ${encryptedClientId} ${encryptedClientSecret}`; | ||
const scriptFullPath = `${process.cwd()}/${scriptPath}`; | ||
const args = [dbUrl, encryptedClientId, encryptedClientSecret]; | ||
|
||
const { stdout, stderr } = await execPromise(command); | ||
const { stdout, stderr } = await execPromise(scriptFullPath, args); | ||
|
async function main(): Promise<void> { | ||
const command = `${process.cwd()}/${scriptPath} ${dbUrl} ${encryptedClientId} ${encryptedClientSecret}`; | ||
|
||
const { stdout, stderr } = await execPromise(command); |
Check warning
Code scanning / CodeQL
Shell command built from environment values Medium
absolute path
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the issue, we will replace the use of execPromise
with execFilePromise
, which allows us to pass the command and its arguments separately. This approach avoids shell interpretation of the command string and mitigates the risk of shell injection. Specifically:
- Extract the script path and arguments into separate variables.
- Use
execFilePromise
to execute the script with the arguments passed as an array. - Ensure that all inputs (e.g.,
scriptPath
,dbUrl
,encryptedClientId
,encryptedClientSecret
) are validated or sanitized before use.
Changes will be made to the updateClientCredential
function in libs/prisma-service/prisma/seed.ts
.
-
Copy modified line R6 -
Copy modified line R9 -
Copy modified lines R436-R437 -
Copy modified line R439
@@ -5,6 +5,6 @@ | ||
import { CommonConstants } from '../../common/src/common.constant'; | ||
import { exec } from 'child_process'; | ||
import { execFile } from 'child_process'; | ||
import * as util from 'util'; | ||
import { encryptClientCredential } from '@credebl/common/cast.helper'; | ||
const execPromise = util.promisify(exec); | ||
const execPromise = util.promisify(execFile); | ||
|
||
@@ -435,5 +435,6 @@ | ||
|
||
const command = `${process.cwd()}/${scriptPath} ${dbUrl} ${encryptedClientId} ${encryptedClientSecret}`; | ||
const scriptFullPath = `${process.cwd()}/${scriptPath}`; | ||
const args = [dbUrl, encryptedClientId, encryptedClientSecret]; | ||
|
||
const { stdout, stderr } = await execPromise(command); | ||
const { stdout, stderr } = await execPromise(scriptFullPath, args); | ||
|
Signed-off-by: Krishna Waske <[email protected]>
Signed-off-by: Krishna Waske <[email protected]>
Signed-off-by: Krishna Waske <[email protected]>
|
What