1
- from typing import Any , Literal
1
+ from typing import Annotated , Any , Literal
2
2
3
- from pydantic import AnyHttpUrl , BaseModel , ConfigDict , SecretStr , computed_field
3
+ from pydantic import AnyHttpUrl , BaseModel , ConfigDict , Field , SecretStr , computed_field
4
4
5
5
6
6
def credential_schema (schema : dict [str , Any ]) -> None :
@@ -50,9 +50,21 @@ class TenableCloudCredential(Credential):
50
50
name : Literal ["Tenable Cloud" ] = "Tenable Cloud"
51
51
slug : Literal ["tvm" ] = "tvm"
52
52
description : str = "Tenable Cloud Credential"
53
- url : AnyHttpUrl = "https://cloud.tenable.com"
54
- access_key : str
55
- secret_key : SecretStr
53
+ url : Annotated [
54
+ AnyHttpUrl ,
55
+ Field (
56
+ title = "Cloud URL" ,
57
+ description = "Only needs to be modified when interacting with a FedRAMP cloud instance" ,
58
+ ),
59
+ ] = "https://cloud.tenable.com"
60
+ access_key : Annotated [
61
+ str ,
62
+ Field (title = "API Access Key" , description = "Tenable Cloud API Access Key" ),
63
+ ]
64
+ secret_key : Annotated [
65
+ SecretStr ,
66
+ Field (title = "API Secret Key" , description = "Tenable Cloud API Secret Key" ),
67
+ ]
56
68
57
69
58
70
class TenableSCCredential (Credential ):
@@ -64,6 +76,15 @@ class TenableSCCredential(Credential):
64
76
name : Literal ["Tenable Security Center" ] = "Tenable Security Center"
65
77
slug : Literal ["tsc" ] = "tsc"
66
78
description : str = "Tenable Security Center Credential"
67
- url : AnyHttpUrl
68
- access_key : str
69
- secret_key : SecretStr
79
+ url : Annotated [
80
+ AnyHttpUrl ,
81
+ Field (title = "Host URL" , description = "Security Center Application URL" ),
82
+ ]
83
+ access_key : Annotated [
84
+ str ,
85
+ Field (title = "API Access Key" , description = "Security Center API Access Key" ),
86
+ ]
87
+ secret_key : Annotated [
88
+ SecretStr ,
89
+ Field (title = "API Secret Key" , description = "Security Center API Secret Key" ),
90
+ ]
0 commit comments