REST controller for managing help and documentation resources. --> Don't Merge #101
REST controller for managing help and documentation resources. --> Don't Merge #101
Conversation
src/main/java/com/publicissapient/kpidashboard/apis/appsetting/rest/HelpController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/publicissapient/kpidashboard/apis/appsetting/rest/HelpController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/publicissapient/kpidashboard/apis/appsetting/rest/HelpController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/publicissapient/kpidashboard/apis/appsetting/rest/HelpController.java
Outdated
Show resolved
Hide resolved
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 22088979 | Triggered | Generic High Entropy Secret | 4d2fa17 | src/main/resources/application.properties | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
| ## Help & Support Configuration - End | ||
|
|
||
| ## Potential Economic Benefits Configuration - Start | ||
| peb.totalDevelopers=30 |
There was a problem hiding this comment.
Use the convention of specifying the property names by having a hyphen separator.
| ## Help & Support Configuration - End | ||
|
|
||
| ## Potential Economic Benefits Configuration - Start | ||
| peb.totalDevelopers=30 |
There was a problem hiding this comment.
Add a grouping for these properties. peb.configuration for example or something relevant
| ## Potential Economic Benefits Configuration - Start | ||
| peb.totalDevelopers=30 | ||
| peb.avgCostPerDeveloper=100000.00 | ||
| peb.timeDuration=Per Year |
There was a problem hiding this comment.
The duration shouldn't be a string. Try using the TemporalAggregationUnit (my recommendation) or ChronoUnit enum or if it is a string then make sure that it easily mapped to any of these two enums
| executive.dashboard.timeout.minutes=3 | ||
|
|
||
| ## Help & Support Configuration - Start | ||
| help.productDocumentationUrl=https://docs.example.com/product |
There was a problem hiding this comment.
Please apply the review from the peb properties to these ones as well at least on the naming convention
| public class HelpAndSupportController { | ||
|
|
||
| @Autowired | ||
| private HelpConfig helpConfig; |
There was a problem hiding this comment.
Use the constructor based injection along with @requiredargsconstructor
| @Autowired | ||
| private HelpConfig helpConfig; | ||
|
|
||
| public void setHelpConfig(HelpConfig helpConfig) { |
| resourceLinks.put("raiseTicket", helpConfig.getRaiseTicketUrl() != null ? helpConfig.getRaiseTicketUrl() : ""); | ||
| resourceLinks.put("supportChannel", helpConfig.getSupportChannelUrl() != null ? helpConfig.getSupportChannelUrl() : ""); | ||
| log.info("Help configuration retrieved successfully"); | ||
| return ResponseEntity.ok(new ServiceResponse(true, "Help and Support configuration retrieved successfully", resourceLinks)); |
There was a problem hiding this comment.
Create a DTO instead of using a map
| @RequestMapping("/help") | ||
| @Tag(name = "Help", description = "Endpoints for managing support and documentation resources") | ||
| @Slf4j | ||
| public class HelpAndSupportController { |
There was a problem hiding this comment.
Why is it help controller when this is actually an endpoint for managing documentations?
@RequestMapping("/documentation") and then have the required endpoints beneath it
| @Autowired | ||
| private PEBConfig pebConfig; | ||
|
|
||
| public void setPebConfig(PEBConfig pebConfig) { |
There was a problem hiding this comment.
Please apply the same review comments as received for "HelpAndSupportController"
No description provided.