Skip to content

Commit

Permalink
Add integration with Amazon Bedrock (#1760)
Browse files Browse the repository at this point in the history
* Add integration with Amazon Bedrock #1759

Add remediation guidelines for secrets and malware

* Add integration with Amazon Bedrock #1759

* Add integration with Amazon Bedrock #1759

Add remediation guidelines for secrets and malware

* Save generative ai integration error status #1759
  • Loading branch information
ramanan-ravi authored Nov 24, 2023
1 parent 7a50f2d commit 7cd47e4
Show file tree
Hide file tree
Showing 26 changed files with 1,209 additions and 698 deletions.
1 change: 1 addition & 0 deletions deepfence_server/apiDocs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
tagRegistry = "Registry"
tagInternal = "Internal"
tagIntegration = "Integration"
tagGenerativeAi = "Generative AI"
tagReports = "Reports"
tagSettings = "Settings"
tagDiffAdd = "Diff Add"
Expand Down
60 changes: 35 additions & 25 deletions deepfence_server/apiDocs/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,31 +709,41 @@ func (d *OpenApiDocs) AddIntegrationOperations() {
"Delete Integration", "Delete integration",
http.StatusNoContent, []string{tagIntegration}, bearerToken, new(IntegrationIDPathReq), nil)

d.AddOperation("addAiIntegration", http.MethodPost, "/deepfence/ai-integration",
"Add AI Integration", "Add a new supported AI Integration",
http.StatusOK, []string{tagIntegration}, bearerToken, new(AddAiIntegrationRequest), new(MessageResponse))
d.AddOperation("listAiIntegration", http.MethodGet, "/deepfence/ai-integration",
"List AI Integrations", "List all the added AI Integrations",
http.StatusOK, []string{tagIntegration}, bearerToken, nil, new([]AiIntegrationListResponse))
d.AddOperation("deleteAiIntegration", http.MethodDelete, "/deepfence/ai-integration/{integration_id}",
"Delete AI Integration", "Delete AI integration",
http.StatusNoContent, []string{tagIntegration}, bearerToken, new(IntegrationIDPathReq), nil)
d.AddOperation("setDefaultAiIntegration", http.MethodPut, "/deepfence/ai-integration/{integration_id}/default",
"Set Default AI Integration", "Set Default AI integration",
http.StatusNoContent, []string{tagIntegration}, bearerToken, new(IntegrationIDPathReq), nil)

d.AddOperation("aiIntegrationCloudPostureQuery", http.MethodPost, "/deepfence/ai-integration/query/cloud-posture",
"Send Cloud Posture query to AI Integration", "Send Cloud Posture query to AI Integration",
http.StatusOK, []string{tagIntegration}, bearerToken, new(AiIntegrationCloudPostureRequest), new(string))
d.AddOperation("aiIntegrationLinuxPostureQuery", http.MethodPost, "/deepfence/ai-integration/query/linux-posture",
"Send Linux Posture query to AI Integration", "Send Linux Posture query to AI Integration",
http.StatusOK, []string{tagIntegration}, bearerToken, new(AiIntegrationLinuxPostureRequest), new(string))
d.AddOperation("aiIntegrationKubernetesPostureQuery", http.MethodPost, "/deepfence/ai-integration/query/kubernetes-posture",
"Send Kubernetes Posture query to AI Integration", "Send Kubernetes Posture query to AI Integration",
http.StatusOK, []string{tagIntegration}, bearerToken, new(AiIntegrationKubernetesPostureRequest), new(string))
d.AddOperation("aiIntegrationVulnerabilityQuery", http.MethodPost, "/deepfence/ai-integration/query/vulnerability",
"Send Vulnerability query to AI Integration", "Send Vulnerability query to AI Integration",
http.StatusOK, []string{tagIntegration}, bearerToken, new(AiIntegrationVulnerabilityRequest), new(string))
d.AddOperation("addGenerativeAiIntegrationOpenAI", http.MethodPost, "/deepfence/generative-ai-integration/openai",
"Add OpenAI Generative AI Integration", "Add a new OpenAI Generative AI Integration",
http.StatusOK, []string{tagGenerativeAi}, bearerToken, new(AddGenerativeAiOpenAIIntegration), new(MessageResponse))
d.AddOperation("addGenerativeAiIntegrationBedrock", http.MethodPost, "/deepfence/generative-ai-integration/bedrock",
"Add AWS Bedrock Generative AI Integration", "Add a new AWS Bedrock Generative AI Integration",
http.StatusOK, []string{tagGenerativeAi}, bearerToken, new(AddGenerativeAiBedrockIntegration), new(MessageResponse))

d.AddOperation("listGenerativeAiIntegration", http.MethodGet, "/deepfence/generative-ai-integration",
"List Generative AI Integrations", "List all the added Generative AI Integrations",
http.StatusOK, []string{tagGenerativeAi}, bearerToken, new(GenerativeAiIntegrationListRequest), new([]GenerativeAiIntegrationListResponse))
d.AddOperation("deleteGenerativeAiIntegration", http.MethodDelete, "/deepfence/generative-ai-integration/{integration_id}",
"Delete Generative AI Integration", "Delete Generative AI integration",
http.StatusNoContent, []string{tagGenerativeAi}, bearerToken, new(IntegrationIDPathReq), nil)
d.AddOperation("setDefaultGenerativeAiIntegration", http.MethodPut, "/deepfence/generative-ai-integration/{integration_id}/default",
"Set Default Generative AI Integration", "Set Default Generative AI integration",
http.StatusNoContent, []string{tagGenerativeAi}, bearerToken, new(IntegrationIDPathReq), nil)

d.AddOperation("generativeAiIntegrationCloudPostureQuery", http.MethodPost, "/deepfence/generative-ai-integration/query/cloud-posture",
"Send Cloud Posture query to Generative AI Integration", "Send Cloud Posture query to Generative AI Integration",
http.StatusOK, []string{tagGenerativeAi}, bearerToken, new(GenerativeAiIntegrationCloudPostureRequest), new(string))
d.AddOperation("generativeAiIntegrationLinuxPostureQuery", http.MethodPost, "/deepfence/generative-ai-integration/query/linux-posture",
"Send Linux Posture query to Generative AI Integration", "Send Linux Posture query to Generative AI Integration",
http.StatusOK, []string{tagGenerativeAi}, bearerToken, new(GenerativeAiIntegrationLinuxPostureRequest), new(string))
d.AddOperation("generativeAiIntegrationKubernetesPostureQuery", http.MethodPost, "/deepfence/generative-ai-integration/query/kubernetes-posture",
"Send Kubernetes Posture query to Generative AI Integration", "Send Kubernetes Posture query to Generative AI Integration",
http.StatusOK, []string{tagGenerativeAi}, bearerToken, new(GenerativeAiIntegrationKubernetesPostureRequest), new(string))
d.AddOperation("generativeAiIntegrationVulnerabilityQuery", http.MethodPost, "/deepfence/generative-ai-integration/query/vulnerability",
"Send Vulnerability query to Generative AI Integration", "Send Vulnerability query to Generative AI Integration",
http.StatusOK, []string{tagGenerativeAi}, bearerToken, new(GenerativeAiIntegrationVulnerabilityRequest), new(string))
d.AddOperation("generativeAiIntegrationSecretQuery", http.MethodPost, "/deepfence/generative-ai-integration/query/secret",
"Send Secret query to Generative AI Integration", "Send Secret query to Generative AI Integration",
http.StatusOK, []string{tagGenerativeAi}, bearerToken, new(GenerativeAiIntegrationSecretRequest), new(string))
d.AddOperation("generativeAiIntegrationMalwareQuery", http.MethodPost, "/deepfence/generative-ai-integration/query/malware",
"Send Malware query to Generative AI Integration", "Send Malware query to Generative AI Integration",
http.StatusOK, []string{tagGenerativeAi}, bearerToken, new(GenerativeAiIntegrationMalwareRequest), new(string))
}

func (d *OpenApiDocs) AddReportsOperations() {
Expand Down
12 changes: 6 additions & 6 deletions deepfence_server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/Masterminds/sprig/v3 v3.2.0
github.com/PagerDuty/go-pagerduty v1.7.0
github.com/andygrunwald/go-jira v1.16.0
github.com/aws/aws-sdk-go v1.44.325
github.com/aws/aws-sdk-go v1.48.1
github.com/casbin/casbin/v2 v2.75.0
github.com/deepfence/ThreatMapper/deepfence_utils v0.0.0-00010101000000-000000000000
github.com/docker/docker v24.0.5+incompatible
Expand Down Expand Up @@ -41,7 +41,7 @@ require (
go.opentelemetry.io/otel/exporters/jaeger v1.16.0
go.opentelemetry.io/otel/sdk v1.18.0
go.opentelemetry.io/otel/trace v1.18.0
golang.org/x/crypto v0.12.0
golang.org/x/crypto v0.14.0
golang.org/x/mod v0.10.0
gotest.tools v2.2.0+incompatible
k8s.io/api v0.28.0
Expand Down Expand Up @@ -130,11 +130,11 @@ require (
go.opentelemetry.io/contrib v1.0.0 // indirect
go.opentelemetry.io/otel/metric v1.18.0 // indirect
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.8.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down
25 changes: 12 additions & 13 deletions deepfence_server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/XSAM/otelsql v0.25.0 h1:ji1G+O45lrmZV9pXv2jQNRzYVFIwEB0jlY0XXdgpuNk=
github.com/XSAM/otelsql v0.25.0/go.mod h1:VfWJ7nRF1t74mSL36s0ksIohT4nmFH5/opajHcmXPFc=
github.com/andygrunwald/go-jira v1.16.0 h1:PU7C7Fkk5L96JvPc6vDVIrd99vdPnYudHu4ju2c2ikQ=
github.com/andygrunwald/go-jira v1.16.0/go.mod h1:UQH4IBVxIYWbgagc0LF/k9FRs9xjIiQ8hIcC6HfLwFU=
github.com/aws/aws-sdk-go v1.44.325 h1:jF/L99fJSq/BfiLmUOflO/aM+LwcqBm0Fe/qTK5xxuI=
github.com/aws/aws-sdk-go v1.44.325/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.48.1 h1:OXPUVL4cLdsDsqkVIuhwY+D389tjI7e1xu0lsDYyeMk=
github.com/aws/aws-sdk-go v1.48.1/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/bool64/dev v0.2.29 h1:x+syGyh+0eWtOzQ1ItvLzOGIWyNWnyjXpHIcpF2HvL4=
github.com/bool64/dev v0.2.29/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg=
github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E=
Expand Down Expand Up @@ -351,8 +351,9 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM=
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
Expand All @@ -376,11 +377,10 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8=
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -415,30 +415,29 @@ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0=
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
58 changes: 29 additions & 29 deletions deepfence_server/handler/audit_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@ import (
)

const (
EVENT_COMPLIANCE_SCAN = string(utils.NEO4J_COMPLIANCE_SCAN)
EVENT_VULNERABILITY_SCAN = string(utils.NEO4J_VULNERABILITY_SCAN)
EVENT_SECRET_SCAN = string(utils.NEO4J_SECRET_SCAN)
EVENT_MALWARE_SCAN = string(utils.NEO4J_MALWARE_SCAN)
EVENT_INTEGRATION = "integration"
EVENT_AI_INTEGRATION = "ai-integration"
EVENT_AUTH = "auth"
EVENT_REPORTS = "reports"
EVENT_SETTINGS = "settings"
EVENT_REGISTRY = "registry"
ACTION_START = "start"
ACTION_STOP = "stop"
ACTION_LOGOUT = "logout"
ACTION_LOGIN = "login"
ACTION_INVITE = "invite"
ACTION_INTERRUPT = "interrupt"
ACTION_CREATE = "create"
ACTION_UPDATE = "update"
ACTION_DELETE = "delete"
ACTION_ENABLE = "enable"
ACTION_DISABLE = "disable"
ACTION_BULK = "bulk"
ACTION_DOWNLOAD = "download"
ACTION_NOTIFY = "notify"
ACTION_RESET_PASSWORD = "reset_password"
ACTION_VERIFY_PASSWORD = "verify_password"
ACTION_RESET_TOKEN = "reset_token"
ACTION_TOKEN_AUTH = "token_auth"
ACTION_LOGS = "logs"
EVENT_COMPLIANCE_SCAN = string(utils.NEO4J_COMPLIANCE_SCAN)
EVENT_VULNERABILITY_SCAN = string(utils.NEO4J_VULNERABILITY_SCAN)
EVENT_SECRET_SCAN = string(utils.NEO4J_SECRET_SCAN)
EVENT_MALWARE_SCAN = string(utils.NEO4J_MALWARE_SCAN)
EVENT_INTEGRATION = "integration"
EVENT_GENERATIVE_AI_INTEGRATION = "generative-ai-integration"
EVENT_AUTH = "auth"
EVENT_REPORTS = "reports"
EVENT_SETTINGS = "settings"
EVENT_REGISTRY = "registry"
ACTION_START = "start"
ACTION_STOP = "stop"
ACTION_LOGOUT = "logout"
ACTION_LOGIN = "login"
ACTION_INVITE = "invite"
ACTION_INTERRUPT = "interrupt"
ACTION_CREATE = "create"
ACTION_UPDATE = "update"
ACTION_DELETE = "delete"
ACTION_ENABLE = "enable"
ACTION_DISABLE = "disable"
ACTION_BULK = "bulk"
ACTION_DOWNLOAD = "download"
ACTION_NOTIFY = "notify"
ACTION_RESET_PASSWORD = "reset_password"
ACTION_VERIFY_PASSWORD = "verify_password"
ACTION_RESET_TOKEN = "reset_token"
ACTION_TOKEN_AUTH = "token_auth"
ACTION_LOGS = "logs"
)

func GetTokenFromRequest(ja *jwtauth.JWTAuth, r *http.Request) (jwt.Token, error) {
Expand Down
Loading

0 comments on commit 7cd47e4

Please sign in to comment.