Skip to content

Commit

Permalink
add support for access type
Browse files Browse the repository at this point in the history
  • Loading branch information
notshivansh committed Jul 24, 2024
1 parent a649f84 commit 9687e7e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ temp_*
*.templates-config.json
https:
**/target_test-classes

**/data-kafka-data
**/data-zoo-data
**/data-zoo-logs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ function About() {
}

const components = [accountInfoComponent,
window.IS_SAAS !== "true" ? <UpdateIpsComponent
!func.checkLocal() ? <UpdateIpsComponent
key={"cidr"}
description={"We use these CIDRs to mark the endpoints as PRIVATE"}
title={"Private CIDRs list"}
Expand All @@ -450,7 +450,7 @@ function About() {
onRemove={(val) => handleIpsChange(val, false, "cidr")}
type={"cidr"}
/> : null,
window.IS_SAAS !== "true" ? <UpdateIpsComponent
!func.checkLocal() ? <UpdateIpsComponent
key={"partner"}
description={"We use these IPS to mark the endpoints as PARTNER"}
title={"Third parties Ips list"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,9 +860,13 @@ getRowInfo(severity, apiInfo,jiraIssueUrl, sensitiveData){
let access_type = null
let access_types = apiInfo["apiAccessTypes"]
if (!access_types || access_types.length == 0) {
access_type = "none"
access_type = "No access type"
} else if (access_types.indexOf("PUBLIC") !== -1) {
access_type = "Public"
} else if (access_types.indexOf("PARTNER") !== -1) {
access_type = "Partner"
} else if (access_types.indexOf("THIRD_PARTY") !== -1) {
access_type = "Third-party"
} else {
access_type = "Private"
}
Expand Down
2 changes: 2 additions & 0 deletions apps/dashboard/web/polaris_web/web/src/util/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@ mergeApiInfoAndApiCollection(listEndpoints, apiInfoList, idToName) {
access_type = "Public"
} else if (access_types.indexOf("PARTNER") !== -1){
access_type = "Partner"
} else if (access_types.indexOf("THIRD_PARTY") !== -1){
access_type = "Third-party"
}else{
access_type = "Private"
}
Expand Down
2 changes: 1 addition & 1 deletion libs/dao/src/main/java/com/akto/dto/ApiInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public enum AuthType {
}

public enum ApiAccessType {
PUBLIC, PRIVATE, PARTNER
PUBLIC, PRIVATE, PARTNER, THIRD_PARTY
}

public static class ApiInfoKey {
Expand Down

0 comments on commit 9687e7e

Please sign in to comment.