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

[Discussion] Do we need to rectify SecurityMgr? (Sensitive Data handling) #131

Closed
MoonkiHong opened this issue Sep 14, 2020 · 6 comments · Fixed by #133
Closed

[Discussion] Do we need to rectify SecurityMgr? (Sensitive Data handling) #131

MoonkiHong opened this issue Sep 14, 2020 · 6 comments · Fixed by #133
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@MoonkiHong
Copy link
Contributor

I personally think that sensitive data is returned by an access to passPhraseJWTPath. What do you think? @tdrozdovsky

log.Panicf("Failed to create passPhraseJWTPath %s: %s\n", passPhraseJWTPath, err)

This might be the same potential security risk as follow.

log.Println(logPrefix, "cannot create "+passPhraseJWTFilePath+": ", err)

@MoonkiHong MoonkiHong added the question Further information is requested label Sep 14, 2020
@MoonkiHong MoonkiHong self-assigned this Sep 14, 2020
@MoonkiHong
Copy link
Contributor Author

@tdrozdovsky Plus, could you rectify if err is used in our platform?

deviceResources[i].score, err = orcheEngine.GetScoreWithResource(dev.resource)

@MoonkiHong
Copy link
Contributor Author

@tdrozdovsky This is due to my ongoing analysis with the tool lgtm as follow.

https://lgtm.com/projects/g/lf-edge/edge-home-orchestration-go/alerts/?mode=list

@tdrozdovsky
Copy link
Contributor

I personally think that sensitive data is returned by an access to passPhraseJWTPath. What do you think? @tdrozdovsky

log.Panicf("Failed to create passPhraseJWTPath %s: %s\n", passPhraseJWTPath, err)

This might be the same potential security risk as follow.

log.Println(logPrefix, "cannot create "+passPhraseJWTFilePath+": ", err)

Good point, I know and remember this security issue.

These only informs about a failed attempt to create the passPhraseJWTFilePath file.
But of course, storing such information in files (passPhrase, edge-orchestration.key, etc) is a security risk.
I think in the future this should be solved with secure storage or with access control system such as: SeLinux, SMACK, etc.

Thank you for reminder

@MoonkiHong
Copy link
Contributor Author

@tdrozdovsky Thank you for accepting my suggestion. I have just assigned this issue to you. We are looking forward to seeing your another valuable contribution soon!

@MoonkiHong MoonkiHong added the enhancement New feature or request label Sep 14, 2020
@tdrozdovsky
Copy link
Contributor

@tdrozdovsky Plus, could you rectify if err is used in our platform?

deviceResources[i].score, err = orcheEngine.GetScoreWithResource(dev.resource)

I researched using err variable. Error handling is done below.

if len(deviceScores) <= 0 {
		return errorResp
} else if deviceScores[0].score == scoringmgr.INVALID_SCORE {
	return errorResp
}

Additional processing will make the code more complex.

Therefore, I suggest to ignore the err variable.

	deviceResources[i].score, _ = orcheEngine.GetScoreWithResource(dev.resource)

@MoonkiHong
Copy link
Contributor Author

@tdrozdovsky Plus, could you rectify if err is used in our platform?

deviceResources[i].score, err = orcheEngine.GetScoreWithResource(dev.resource)

I researched using err variable. Error handling is done below.

if len(deviceScores) <= 0 {
		return errorResp
} else if deviceScores[0].score == scoringmgr.INVALID_SCORE {
	return errorResp
}

Additional processing will make the code more complex.

Therefore, I suggest to ignore the err variable.

	deviceResources[i].score, _ = orcheEngine.GetScoreWithResource(dev.resource)

@tdrozdovsky It is reasonable. ^^ Could you suggest the regarding PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants