Skip to content

Commit cffcc6a

Browse files
authored
Merge pull request #1836 from CVEProject/dr_remove_soft_quota
removing soft quota and renmaing hard quota to id_quota
2 parents 833844f + 1cfeda8 commit cffcc6a

34 files changed

Lines changed: 155 additions & 176 deletions

api-docs/openapi.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"servers": [
1313
{
14-
"url": "https://cveawg-dev.mitre.org/api"
14+
"url": "urlplaceholder"
1515
}
1616
],
1717
"paths": {
@@ -2081,7 +2081,7 @@
20812081
"example": {
20822082
"short_name": "fake_company",
20832083
"long_name": "Fake Company",
2084-
"hard_quota": 1000,
2084+
"id_quota": 1000,
20852085
"authority": [
20862086
"CNA"
20872087
]
@@ -2208,14 +2208,14 @@
22082208
}
22092209
}
22102210
},
2211-
"/registry/org/{shortname}/hard_quota": {
2211+
"/registry/org/{shortname}/id_quota": {
22122212
"get": {
22132213
"tags": [
22142214
"Registry Organization"
22152215
],
22162216
"summary": "Retrieves an organization's CVE ID quota (accessible to all registered users)",
22172217
"description": " <h2>Access Control</h2> <p>All registered users can access this endpoint</p> <h2>Expected Behavior</h2> <p><b>Regular, CNA & Admin Users:</b> Retrieves the CVE ID quota for the user's organization</p> <p><b>Secretariat:</b> Retrieves the CVE ID quota for any organization</p>",
2218-
"operationId": "orgHardQuota",
2218+
"operationId": "orgIdQuota",
22192219
"parameters": [
22202220
{
22212221
"name": "shortname",
@@ -2616,7 +2616,7 @@
26162616
"Registry Organization"
26172617
],
26182618
"summary": "Updates information about the organization specified by short name (accessible Temporarily to Secretariat only)",
2619-
"description": " <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role temporarily.</p> <p>In the future, only the organization's admin will be able to request changes to its information.</p> <p>With Joint Approval required for the following fields:</p> <h2>Expected Behavior</h2> <b>This endpoint expects a full organization object in the request body.</b> <p><b>Secretariat:</b> Updates any organization's information</p> <p><b>Organization Admin:</b> Requests changes to its organization's information</p> <ul> <li>short_name</li> <li>long_name</li> <li>authority</li> <li>aliases</li> <li>oversees</li> <li>top_level_root</li> <li>charter_or_scope</li> <li>product_list</li> <li>disclosure_policy</li> <li>contact_info.websites</li> <li>contact_info.emails</li> <li>contact_info.phone</li> <li>partner_role_type</li> <li>partner_country</li> <li>advisory_locations</li> <li>industry</li> <li>tl_root_start_date</li> <li>is_cna_discussion_list</li> </ul>",
2619+
"description": " <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role temporarily.</p> <p>In the future, only the organization's admin will be able to request changes to its information.</p> <p>With Joint Approval required for the following fields:</p> <h2>Expected Behavior</h2> <b>This endpoint expects a full organization object in the request body.</b> <p><b>Secretariat:</b> Updates any organization's information</p> <p><b>Organization Admin:</b> Requests changes to its organization's information</p> <ul> <li>short_name</li> <li>long_name</li> <li>authority</li> <li>aliases</li> <li>oversees</li> <li>top_level_root</li> <li>charter_or_scope</li> <li>product_list</li> <li>disclosure_policy</li> <li>contact_info.websites</li> <li>contact_info.emails</li> <li>contact_info.phone</li> <li>partner_role_type</li> <li>partner_country</li> <li>advisory_locations</li> <li>advisory_location_require_credentials</li> <li>vulnerability_advisory_location_for_web_scraping</li> <li>industry</li> <li>tl_root_start_date</li> <li>is_cna_discussion_list</li> </ul>",
26202620
"operationId": "orgUpdateSingle",
26212621
"parameters": [
26222622
{
@@ -2710,7 +2710,7 @@
27102710
"example": {
27112711
"short_name": "fake_company",
27122712
"long_name": "Fake Company",
2713-
"hard_quota": 1000,
2713+
"id_quota": 1000,
27142714
"authority": [
27152715
"CNA"
27162716
]
@@ -3608,6 +3608,13 @@
36083608
},
36093609
"description": "The shortname of the organization"
36103610
},
3611+
{
3612+
"name": "registry",
3613+
"in": "query",
3614+
"schema": {
3615+
"type": "string"
3616+
}
3617+
},
36113618
{
36123619
"$ref": "#/components/parameters/id_quota"
36133620
},

schemas/registry-org/BaseOrg.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,12 @@
106106
"$ref": "#/definitions/uuidType"
107107
}
108108
},
109-
"hard_quota": {
109+
"id_quota": {
110110
"description": "The maximum number of CVE IDs this organization can reserve.",
111111
"type": "integer",
112112
"minimum": 0,
113113
"maximum": 100000
114114
},
115-
"soft_quota": {
116-
"description": "The threshold for notifying the organization about their remaining CVE ID count.",
117-
"type": "integer",
118-
"minimum": 0,
119-
"maximum": 100000
120-
},
121115
"private_contacts": {
122116
"type": "array",
123117
"items": {

schemas/registry-org/CNAOrg.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,7 @@
8484
}
8585
}
8686
},
87-
"hard_quota": {
88-
"type": "integer",
89-
"minimum": 0,
90-
"maximum": 100000
91-
},
92-
"soft_quota": {
87+
"id_quota": {
9388
"type": "integer",
9489
"minimum": 0,
9590
"maximum": 100000
@@ -147,6 +142,6 @@
147142
},
148143
"required": [
149144
"short_name",
150-
"hard_quota"
145+
"id_quota"
151146
]
152147
}

schemas/registry-org/SecretariatOrg.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@
1818
"$ref": "/BaseOrg#/definitions/uuidType"
1919
}
2020
},
21-
"hard_quota": {
22-
"type": "integer",
23-
"minimum": 0
24-
},
25-
"soft_quota": {
21+
"id_quota": {
2622
"type": "integer",
2723
"minimum": 0
2824
}
2925
},
30-
"required": ["hard_quota"]
26+
"required": ["id_quota"]
3127
}
3228
]
3329
}

schemas/registry-org/create-registry-org-response.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,9 @@
9696
"type": "string",
9797
"description": "List of products associated with the organization"
9898
},
99-
"soft_quota": {
99+
"id_quota": {
100100
"type": "integer",
101-
"description": "Soft quota for CVE IDs"
102-
},
103-
"hard_quota": {
104-
"type": "integer",
105-
"description": "Hard quota for CVE IDs"
101+
"description": "ID quota for CVE IDs"
106102
},
107103
"private_contacts": {
108104
"type": "array",

schemas/registry-org/get-registry-org-quota-response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"type": "object",
44
"properties": {
5-
"hard_quota": {
5+
"id_quota": {
66
"type": "integer",
77
"format": "int32",
88
"description": "The number of CVE IDs the organization is allowed to have in the RESERVED state at one time."

schemas/registry-org/get-registry-org-response.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,9 @@
193193
"format": "date-time",
194194
"description": "Timestamp of the last update to the organization data"
195195
},
196-
"hard_quota": {
196+
"id_quota": {
197197
"type": "integer",
198-
"description": "Hard quota for CVE IDs"
199-
},
200-
"soft_quota": {
201-
"type": "integer",
202-
"description": "Soft quota for CVE IDs"
198+
"description": "ID quota for CVE IDs"
203199
},
204200
"charter_or_scope": {
205201
"type": "string",

schemas/registry-org/list-registry-orgs-response.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,9 @@
222222
"format": "date-time",
223223
"description": "Timestamp of the last update to the organization data"
224224
},
225-
"hard_quota": {
225+
"id_quota": {
226226
"type": "integer",
227-
"description": "Hard quota for CVE IDs"
228-
},
229-
"soft_quota": {
230-
"type": "integer",
231-
"description": "Soft quota for CVE IDs"
227+
"description": "ID quota for CVE IDs"
232228
},
233229
"charter_or_scope": {
234230
"type": "string",

schemas/registry-org/update-registry-org-response.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,9 @@
8585
"type": "string",
8686
"description": "List of products associated with the organization"
8787
},
88-
"soft_quota": {
88+
"id_quota": {
8989
"type": "integer",
90-
"description": "Soft quota for CVE IDs"
91-
},
92-
"hard_quota": {
93-
"type": "integer",
94-
"description": "Hard quota for CVE IDs"
90+
"description": "ID quota for CVE IDs"
9591
},
9692
"private_contacts": {
9793
"type": "array",

src/constants/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function getConstants () {
4444
USER_ROLES: [
4545
'ADMIN'
4646
],
47-
JOINT_APPROVAL_FIELDS: ['short_name', 'long_name', 'authority', 'aliases', 'oversees', 'top_level_root', 'charter_or_scope', 'product_list', 'disclosure_policy', 'partner_role_type', 'partner_number', 'program_data.cve_website_update_date', 'program_data.cve_website_update_needed', 'program_data.status', 'advisory_locations', 'advisory_location_require_credentials', 'vulnerability_advisory_location_for_web_scraping', 'tl_root_start_date', 'is_cna_discussion_list', 'hard_quota'],
47+
JOINT_APPROVAL_FIELDS: ['short_name', 'long_name', 'authority', 'aliases', 'oversees', 'top_level_root', 'charter_or_scope', 'product_list', 'disclosure_policy', 'partner_role_type', 'partner_number', 'program_data.cve_website_update_date', 'program_data.cve_website_update_needed', 'program_data.status', 'advisory_locations', 'advisory_location_require_credentials', 'vulnerability_advisory_location_for_web_scraping', 'tl_root_start_date', 'is_cna_discussion_list', 'id_quota'],
4848
JOINT_APPROVAL_FIELDS_LEGACY: ['short_name', 'name', 'authority.active_roles', 'policies.id_quota'],
4949
ORG_EXCLUDED_FIELDS: ['__t', '__v', '_id', 'inUse', 'in_use'],
5050
ORG_RESTRICTED_FIELDS: ['program_data'],

0 commit comments

Comments
 (0)