├── backend └── pkg │ ├── modules │ ├── assets │ │ ├── .gitkeep │ │ ├── traceanalyzer │ │ │ ├── dictionaries │ │ │ │ └── tests.txt │ │ │ ├── sensitive_keywords │ │ │ │ ├── tests.txt │ │ │ │ ├── grepstrings-basic.txt │ │ │ │ └── secret-keywords.txt │ │ │ └── sensitive_rules │ │ │ │ ├── sensitive_rules.yaml │ │ │ │ ├── sensitive_rules_1.yaml │ │ │ │ └── pii.yaml │ │ └── bfla │ │ │ ├── images │ │ │ ├── img_1.png │ │ │ ├── img_2.png │ │ │ ├── img_3.png │ │ │ └── BFLA_FSM.png │ │ │ └── BFLA_FSM.dot │ ├── internal │ │ ├── traceanalyzer │ │ │ ├── sensitive │ │ │ │ └── sensitive_test_01.yaml │ │ │ ├── utils │ │ │ │ ├── consts.go │ │ │ │ └── severity.go │ │ │ └── restapi │ │ │ │ └── gen.go │ │ ├── core │ │ │ └── gen.go │ │ ├── bfla │ │ │ ├── bfladetector │ │ │ │ └── gen.go │ │ │ └── restapi │ │ │ │ └── gen.go │ │ ├── demo │ │ │ └── gen.go │ │ ├── fuzzer │ │ │ ├── restapi │ │ │ │ └── gen.go │ │ │ └── clients │ │ │ │ └── constants.go │ │ ├── spec_differ │ │ │ └── restapi │ │ │ │ └── gen.go │ │ ├── specreconstructor │ │ │ └── restapi │ │ │ │ └── gen.go │ │ └── common │ │ │ └── http_utils.go │ ├── tools │ │ └── tools.go │ ├── README.md │ └── utils │ │ └── jsonpointer.go │ ├── common │ ├── common.go │ └── trace_source.go │ ├── version │ └── consts.go │ ├── rest │ └── testing.go │ ├── utils │ └── slice.go │ └── test │ └── provided_spec │ └── provided_spec.json ├── api ├── go.mod ├── server │ ├── restapi │ │ └── doc.go │ └── models │ │ └── api_response.go ├── generate.sh └── client │ └── models │ ├── api_response.go │ └── success_response.go ├── charts ├── cr.yaml └── apiclarity │ ├── charts │ └── postgresql-11.6.12.tgz │ ├── Chart.lock │ ├── templates │ ├── serviceaccount.yaml │ ├── traffic_sources │ │ └── tap │ │ │ ├── serviceaccount.yaml │ │ │ ├── clusterrole.yaml │ │ │ ├── _helpers.tpl │ │ │ └── clusterrolebinding.yaml │ ├── secret.yaml │ ├── clusterrolebinding.yaml │ ├── service-lb.yaml │ ├── rolebinding.yaml │ ├── role.yaml │ ├── clusterrole.yaml │ ├── pvc.yaml │ ├── NOTES.txt │ └── _helpers.tpl │ └── Chart.yaml ├── diagram.png ├── ui ├── public │ ├── favicon.png │ ├── robots.txt │ ├── manifest.json │ └── index.html ├── src │ ├── modules │ │ ├── package.json │ │ ├── fuzzer │ │ │ ├── package.json │ │ │ ├── package-lock.json │ │ │ ├── TestItemDisplay │ │ │ │ └── test-item-display.scss │ │ │ ├── index.js │ │ │ ├── NewTestForm │ │ │ │ └── new-test-forms.scss │ │ │ └── EmptyFuzzingDisplay │ │ │ │ └── empty-fuzzing-display.scss │ │ ├── traceanalyzer │ │ │ ├── package.json │ │ │ └── package-lock.json │ │ ├── demoModule │ │ │ └── index.js │ │ ├── bfla │ │ │ ├── AddClientBFLAField │ │ │ │ └── add-client-bfla-field.scss │ │ │ ├── DataCollectionScreen │ │ │ │ ├── data-collection-bfla.scss │ │ │ │ └── index.js │ │ │ ├── ListItemDisplayBFLA │ │ │ │ └── list-item-display-bfla.scss │ │ │ ├── DataCollectionInProgressScreen │ │ │ │ └── index.js │ │ │ ├── AudienceView │ │ │ │ └── client-view.scss │ │ │ ├── StartDetectionResumeLearningScreen │ │ │ │ └── index.js │ │ │ └── NoSpecsScreen │ │ │ │ └── index.js │ │ ├── MODULE_TYPES.js │ │ └── index.js │ ├── components │ │ ├── Tooltip │ │ │ ├── tooltip.scss │ │ │ └── index.js │ │ ├── MessageTextButton │ │ │ ├── message-text-button.scss │ │ │ └── index.js │ │ ├── DropdownSelect │ │ │ └── dropdown-select.scss │ │ ├── Loader │ │ │ ├── loader.scss │ │ │ └── index.js │ │ ├── Form │ │ │ └── form-fields │ │ │ │ ├── VulnerabilityField │ │ │ │ ├── vulnerability-field.scss │ │ │ │ └── index.js │ │ │ │ ├── YesNoToggleField │ │ │ │ ├── yes-no-toggle-field.scss │ │ │ │ └── index.js │ │ │ │ ├── ToggleField │ │ │ │ ├── toggle-field.scss │ │ │ │ └── index.js │ │ │ │ ├── TimeField │ │ │ │ ├── time-field.scss │ │ │ │ └── index.js │ │ │ │ ├── TextAreaField │ │ │ │ ├── text-area-field.scss │ │ │ │ └── index.js │ │ │ │ ├── SelectField │ │ │ │ └── select-field.scss │ │ │ │ ├── utils.js │ │ │ │ ├── DurationField │ │ │ │ └── duration-field.scss │ │ │ │ ├── ListField │ │ │ │ └── list-field.scss │ │ │ │ ├── RadioField │ │ │ │ └── index.js │ │ │ │ ├── CheckboxField │ │ │ │ └── index.js │ │ │ │ └── MultiselectCheckboxField │ │ │ │ └── multiselect-checkbox-field.scss │ │ ├── BoldText │ │ │ └── index.js │ │ ├── CheckboxListSelect │ │ │ └── checkbox-list-select.scss │ │ ├── MainTitleWithRefresh │ │ │ ├── main-title-with-refresh.scss │ │ │ └── index.js │ │ ├── TimeFilter │ │ │ └── time-filter.scss │ │ ├── PageContainer │ │ │ ├── page-container.scss │ │ │ └── index.js │ │ ├── Chart │ │ │ └── chart.scss │ │ ├── Title │ │ │ ├── title.scss │ │ │ └── index.js │ │ ├── CloseButton │ │ │ ├── index.js │ │ │ └── close-button.scss │ │ ├── Text │ │ │ └── text.scss │ │ ├── ToggleButton │ │ │ └── toggle-button.scss │ │ ├── Table │ │ │ ├── utils.js │ │ │ └── ColumnsSelectPanel │ │ │ │ └── columns-select-panel.scss │ │ ├── Filter │ │ │ └── filter-fields │ │ │ │ └── TextField.js │ │ ├── Tag │ │ │ ├── index.js │ │ │ └── tag.scss │ │ ├── StatusIndicator │ │ │ ├── index.js │ │ │ └── status-indicator.scss │ │ ├── Icon │ │ │ ├── icon.scss │ │ │ ├── index.js │ │ │ └── utils.js │ │ ├── BackRouteButton │ │ │ ├── back-route-button.scss │ │ │ └── index.js │ │ ├── NoResultsDisplay │ │ │ ├── no-results-display.scss │ │ │ └── index.js │ │ ├── DotLoader │ │ │ ├── index.js │ │ │ └── dot-loader.scss │ │ ├── MethodWithRiskDisplay │ │ │ └── index.js │ │ ├── MethodTag │ │ │ └── index.js │ │ ├── TitleValueDisplay │ │ │ ├── index.js │ │ │ └── title-value-display.scss │ │ ├── Notification │ │ │ ├── notification.scss │ │ │ └── index.js │ │ ├── TitleWithRiskDisplay │ │ │ ├── title-with-risk-display.scss │ │ │ └── index.js │ │ ├── ModalConfirmation │ │ │ ├── modal-confirmation.scss │ │ │ └── index.js │ │ ├── ColorByRisk │ │ │ └── index.js │ │ ├── Accordion │ │ │ ├── accordion.scss │ │ │ └── index.js │ │ ├── Checkbox │ │ │ └── index.js │ │ ├── DisplaySection │ │ │ ├── display-section.scss │ │ │ └── index.js │ │ ├── Arrow │ │ │ ├── arrow.scss │ │ │ └── index.js │ │ ├── RoundIconContainer │ │ │ └── index.js │ │ ├── DownloadJsonButton │ │ │ └── index.js │ │ ├── IconWithTitle │ │ │ ├── index.js │ │ │ └── icon-with-title.scss │ │ ├── Modal │ │ │ └── utils.js │ │ ├── SideDrawer │ │ │ └── utils.js │ │ ├── TableSimple │ │ │ ├── table-simple.scss │ │ │ └── index.js │ │ ├── VulnerabilityIcon │ │ │ └── index.js │ │ ├── KeyValueList │ │ │ ├── index.js │ │ │ └── key-value-list.scss │ │ ├── RiskTag │ │ │ ├── index.js │ │ │ └── risk-tag.scss │ │ ├── Button │ │ │ └── index.js │ │ ├── LineLoader │ │ │ ├── line-loader.scss │ │ │ ├── LineLoader.stories.js │ │ │ └── index.js │ │ ├── InfoIcon │ │ │ ├── info-icon.scss │ │ │ └── index.js │ │ ├── TabbedPageContainer │ │ │ ├── tabbed-page-container.scss │ │ │ └── index.js │ │ ├── ListDisplay │ │ │ ├── list-display.scss │ │ │ └── index.js │ │ ├── DateTimeSelect │ │ │ └── index.js │ │ ├── DropdownButton │ │ │ └── dropdown-button.scss │ │ ├── JsonDisplayBox │ │ │ └── index.js │ │ └── TextWithLinks │ │ │ └── index.js │ ├── utils │ │ └── fonts │ │ │ ├── CiscoSansTTBold.woff │ │ │ ├── CiscoSansTTBold.woff2 │ │ │ ├── CiscoSansTTRegular.woff │ │ │ ├── CiscoSansTTExtraLight.woff │ │ │ ├── CiscoSansTTRegular.woff2 │ │ │ ├── CiscoSansTTBoldOblique.woff │ │ │ ├── CiscoSansTTBoldOblique.woff2 │ │ │ ├── CiscoSansTTExtraLight.woff2 │ │ │ ├── CiscoSansTTRegularOblique.woff │ │ │ ├── CiscoSansTTRegularOblique.woff2 │ │ │ ├── CiscoSansTTExtraLightOblique.woff │ │ │ ├── CiscoSansTTExtraLightOblique.woff2 │ │ │ └── fonts.scss │ ├── layout │ │ ├── Inventory │ │ │ ├── InventoryDetails │ │ │ │ ├── Specs │ │ │ │ │ ├── utils.js │ │ │ │ │ └── MethodHitCount │ │ │ │ │ │ └── method-hit-count.scss │ │ │ │ ├── MessageImageDisplay │ │ │ │ │ ├── index.js │ │ │ │ │ └── message-image-display.scss │ │ │ │ ├── AdditionalInfoContent │ │ │ │ │ └── additional-info-content.scss │ │ │ │ └── BreadCrumbDisplayInventory │ │ │ │ │ └── breadcrumb-display-inventory.scss │ │ │ └── inventory.scss │ │ ├── TraceSources │ │ │ ├── trace-sources.scss │ │ │ └── GeneralFilter.js │ │ ├── Reviewer │ │ │ ├── ConfirmationModal │ │ │ │ └── confirmation-modal.scss │ │ │ ├── GeneralFilter.js │ │ │ ├── utils.js │ │ │ ├── MergeModal │ │ │ │ └── merge-modal.scss │ │ │ └── reviewer.scss │ │ ├── Dashboard │ │ │ ├── MostUsed.js │ │ │ ├── dashboard.scss │ │ │ ├── ApisList │ │ │ │ └── apis-list.scss │ │ │ ├── ApiUsage │ │ │ │ └── api-usage.scss │ │ │ ├── index.js │ │ │ └── LatestSpec.js │ │ └── Events │ │ │ ├── EventsGraph.js │ │ │ └── EventDetails │ │ │ └── SpecDiff.js │ ├── index.js │ ├── hooks │ │ ├── usePrevious.js │ │ └── index.js │ ├── Path.js │ └── context │ │ └── utils.js ├── .gitignore ├── jsconfig.json └── preinstall.js ├── .gitmodules ├── plugins ├── gateway │ ├── kong │ │ └── deploy │ │ │ ├── patch-ingress.yaml │ │ │ ├── kongPlugin.yaml │ │ │ ├── undeploy.sh │ │ │ └── patch-deployment.yaml │ ├── f5-bigip │ │ ├── F5BigIPBundle.template │ │ │ └── ApiClarityAgent │ │ │ │ ├── deploy │ │ │ │ ├── config.yaml.template │ │ │ │ └── docker │ │ │ │ │ └── launch.sh │ │ │ │ ├── dockerbuild.sh │ │ │ │ ├── requirements.txt │ │ │ │ ├── src │ │ │ │ └── config.yaml │ │ │ │ └── Dockerfile │ │ └── preparebundle.sh │ ├── apigeex │ │ ├── sharedflowbundle.template │ │ │ ├── sharedflows │ │ │ │ └── default.xml │ │ │ ├── Apigee-APIClarity-Tracing.xml │ │ │ └── policies │ │ │ │ ├── JavaScript-APIClarity-Tracing.xml │ │ │ │ ├── Key-Value-Map-Operations-Update-APIClarity-Tracing.xml │ │ │ │ └── Key-Value-Map-Operations-Get-APIClarity-Tracing.xml │ │ └── preparebundle.sh │ └── tyk │ │ ├── v3.2.2 │ │ └── go.mod │ │ └── deploy │ │ └── undeploy.sh ├── kuma │ ├── README.md │ ├── charts │ │ ├── Chart.yaml │ │ ├── templates │ │ │ └── NOTES.txt │ │ └── values.yaml │ └── .helmignore ├── otel-collector │ ├── apiclarityexporter │ │ └── testdata │ │ │ ├── bad_empty_config.yaml │ │ │ └── config.yaml │ └── scripts │ │ └── modify_otelcol_builder.awk ├── Dockerfile.tyk.v3.2.2 ├── api │ ├── server │ │ ├── restapi │ │ │ └── doc.go │ │ └── models │ │ │ ├── hosts_list.go │ │ │ ├── header.go │ │ │ └── api_response.go │ ├── go.mod │ ├── generate.sh │ └── client │ │ └── models │ │ ├── hosts_list.go │ │ ├── header.go │ │ └── api_response.go ├── taper │ ├── extensions │ │ └── http │ │ │ └── go.mod │ ├── README.md │ └── version │ │ └── consts.go ├── Dockerfile.kong └── Dockerfile.taper ├── dist └── swagger │ ├── swagger-favicon-16x16.png │ └── swagger-favicon-32x32.png ├── .gitignore ├── api3 ├── generate.sh ├── common │ └── gen.go ├── global │ └── gen.go ├── notifications │ ├── gen.go │ └── openapi.stub.yaml └── go.mod ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── tools └── spec-aggregator │ └── go.mod └── .goreleaser.yml /backend/pkg/modules/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/openclarity/apiclarity/api 2 | 3 | go 1.15 4 | -------------------------------------------------------------------------------- /charts/cr.yaml: -------------------------------------------------------------------------------- 1 | release-name-template: '{{ .Name }}-{{ .Version }}-helm' 2 | -------------------------------------------------------------------------------- /diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/diagram.png -------------------------------------------------------------------------------- /ui/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/public/favicon.png -------------------------------------------------------------------------------- /ui/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /ui/src/modules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@apiclarity/modules", 3 | "version": "0.1.0" 4 | } 5 | -------------------------------------------------------------------------------- /backend/pkg/modules/assets/traceanalyzer/dictionaries/tests.txt: -------------------------------------------------------------------------------- 1 | longlonglong 2 | pass 3 | AllYourBase 4 | -------------------------------------------------------------------------------- /ui/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | /node_modules 3 | # production 4 | /build 5 | 6 | # misc 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /ui/src/components/Tooltip/tooltip.scss: -------------------------------------------------------------------------------- 1 | .ac-tooltip { 2 | font-size: 11px; 3 | padding: 3px 5px; 4 | } -------------------------------------------------------------------------------- /ui/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "src" 4 | }, 5 | "include": ["src"] 6 | } -------------------------------------------------------------------------------- /backend/pkg/modules/assets/traceanalyzer/sensitive_keywords/tests.txt: -------------------------------------------------------------------------------- 1 | password 2 | ssn 3 | ip 4 | covid_positive 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "wasm-filters"] 2 | path = wasm-filters 3 | url = https://github.com/openclarity/wasm-filters.git 4 | -------------------------------------------------------------------------------- /plugins/gateway/kong/deploy/patch-ingress.yaml: -------------------------------------------------------------------------------- 1 | metadata: 2 | annotations: 3 | konghq.com/plugins: apiclarity-plugin 4 | -------------------------------------------------------------------------------- /ui/src/modules/fuzzer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Fuzzer", 3 | "version": "0.1.0", 4 | "main": "index.js" 5 | } 6 | -------------------------------------------------------------------------------- /dist/swagger/swagger-favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/dist/swagger/swagger-favicon-16x16.png -------------------------------------------------------------------------------- /dist/swagger/swagger-favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/dist/swagger/swagger-favicon-32x32.png -------------------------------------------------------------------------------- /plugins/kuma/README.md: -------------------------------------------------------------------------------- 1 | # APIClarity Kuma plugin 2 | 3 | Read Helm chart [README.md](charts/README.md) file to install the helm chart. 4 | -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTBold.woff -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTBold.woff2 -------------------------------------------------------------------------------- /ui/src/modules/traceanalyzer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TraceAnalyzer", 3 | "version": "0.1.0", 4 | "main": "index.js" 5 | } 6 | -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTRegular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTRegular.woff -------------------------------------------------------------------------------- /ui/src/components/MessageTextButton/message-text-button.scss: -------------------------------------------------------------------------------- 1 | .message-text-button { 2 | font-size: 18px; 3 | font-weight: 400; 4 | } 5 | -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTExtraLight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTExtraLight.woff -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTRegular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTRegular.woff2 -------------------------------------------------------------------------------- /charts/apiclarity/charts/postgresql-11.6.12.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/charts/apiclarity/charts/postgresql-11.6.12.tgz -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTBoldOblique.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTBoldOblique.woff -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTBoldOblique.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTBoldOblique.woff2 -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTExtraLight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTExtraLight.woff2 -------------------------------------------------------------------------------- /backend/pkg/modules/assets/bfla/images/img_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/backend/pkg/modules/assets/bfla/images/img_1.png -------------------------------------------------------------------------------- /backend/pkg/modules/assets/bfla/images/img_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/backend/pkg/modules/assets/bfla/images/img_2.png -------------------------------------------------------------------------------- /backend/pkg/modules/assets/bfla/images/img_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/backend/pkg/modules/assets/bfla/images/img_3.png -------------------------------------------------------------------------------- /ui/src/layout/Inventory/InventoryDetails/Specs/utils.js: -------------------------------------------------------------------------------- 1 | export const SPEC_TYPES = { 2 | PROVIDED: "PROVIDED", 3 | RECONSTRUCTED: "RECONSTRUCTED" 4 | } -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTRegularOblique.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTRegularOblique.woff -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTRegularOblique.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTRegularOblique.woff2 -------------------------------------------------------------------------------- /backend/pkg/modules/assets/bfla/images/BFLA_FSM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/backend/pkg/modules/assets/bfla/images/BFLA_FSM.png -------------------------------------------------------------------------------- /ui/src/components/DropdownSelect/dropdown-select.scss: -------------------------------------------------------------------------------- 1 | .dropdown-select { 2 | .dropdown-select__indicator-separator { 3 | display: none; 4 | } 5 | } -------------------------------------------------------------------------------- /ui/src/components/Loader/loader.scss: -------------------------------------------------------------------------------- 1 | .ag-loader { 2 | position: absolute; 3 | top: 50%; 4 | left: 50%; 5 | transform: translate(-50%, -50%); 6 | } -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTExtraLightOblique.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTExtraLightOblique.woff -------------------------------------------------------------------------------- /ui/src/utils/fonts/CiscoSansTTExtraLightOblique.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openclarity/apiclarity/HEAD/ui/src/utils/fonts/CiscoSansTTExtraLightOblique.woff2 -------------------------------------------------------------------------------- /plugins/gateway/f5-bigip/F5BigIPBundle.template/ApiClarityAgent/deploy/config.yaml.template: -------------------------------------------------------------------------------- 1 | apiclarity-url: {{APIClarityURL}} 2 | apiclarity-token: {{APIClarityToken}} 3 | -------------------------------------------------------------------------------- /ui/src/components/Form/form-fields/VulnerabilityField/vulnerability-field.scss: -------------------------------------------------------------------------------- 1 | .vulnerability-field { 2 | .vulnerability-field-icon { 3 | margin-right: 5px; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /ui/src/components/BoldText/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const BoldText = ({children}) => {children} 4 | 5 | export default BoldText; -------------------------------------------------------------------------------- /plugins/gateway/f5-bigip/F5BigIPBundle.template/ApiClarityAgent/dockerbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | APICLARITY_AGENT_IMAGE=apiclarity-bigip-agent 4 | 5 | docker build . -t ${APICLARITY_AGENT_IMAGE} -------------------------------------------------------------------------------- /ui/src/components/Form/form-fields/YesNoToggleField/yes-no-toggle-field.scss: -------------------------------------------------------------------------------- 1 | .ps-field-wrapper.ps-yes-no-toggle { 2 | .ps-radio-container .ps-radio { 3 | margin-bottom: 0; 4 | } 5 | } -------------------------------------------------------------------------------- /plugins/gateway/f5-bigip/F5BigIPBundle.template/ApiClarityAgent/requirements.txt: -------------------------------------------------------------------------------- 1 | certifi==2022.9.24 2 | charset-normalizer==2.0.12 3 | idna==3.4 4 | PyYAML==6.0 5 | requests==2.27.1 6 | urllib3==1.26.12 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | db.db 3 | backend/bin/* 4 | plugins/gateway/kong/bin/* 5 | /bin/* 6 | *.gob 7 | goreleaser_artifacts/ 8 | site/* 9 | .vscode/* 10 | backend/.vscode/* 11 | .DS_Store 12 | data.txt -------------------------------------------------------------------------------- /plugins/kuma/charts/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: kuma-plugin 3 | description: Configure Kuma dataplanes to send traces to APIClarity 4 | type: application 5 | version: latest 6 | appVersion: latest 7 | -------------------------------------------------------------------------------- /plugins/kuma/charts/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Dataplane proxies of Kuma services matching "{{ .Values.kuma.kumaService }}" 2 | will send APIClarity traces to "{{ .Values.apiclarity.hostname }}:{{ .Values.apiclarity.port }}" 3 | -------------------------------------------------------------------------------- /ui/src/components/CheckboxListSelect/checkbox-list-select.scss: -------------------------------------------------------------------------------- 1 | .checkbox-list-select-wrapper { 2 | .ag-checkbox-wrapper { 3 | &:not(:last-child) { 4 | margin-bottom: 10px; 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /ui/src/components/MainTitleWithRefresh/main-title-with-refresh.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .main-title-with-refresh { 4 | .icon { 5 | color: $color-main; 6 | margin-left: 10px; 7 | } 8 | } -------------------------------------------------------------------------------- /backend/pkg/modules/assets/traceanalyzer/sensitive_keywords/grepstrings-basic.txt: -------------------------------------------------------------------------------- 1 | password 2 | user 3 | username 4 | select 5 | update 6 | delete 7 | ssn 8 | dob 9 | ccn 10 | passwd 11 | pass 12 | administrator 13 | secret 14 | key 15 | -------------------------------------------------------------------------------- /ui/src/components/TimeFilter/time-filter.scss: -------------------------------------------------------------------------------- 1 | .time-filter-wrapper { 2 | display: flex; 3 | 4 | > :not(:first-child) { 5 | margin-left: 10px; 6 | } 7 | .dropdown-select { 8 | width: 200px; 9 | } 10 | } -------------------------------------------------------------------------------- /ui/src/components/PageContainer/page-container.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .page-container { 4 | background-color: white; 5 | box-shadow: 0px 0px 10px rgba($color-shadow-dark, 0.12); 6 | box-sizing: border-box; 7 | } -------------------------------------------------------------------------------- /ui/src/components/Chart/chart.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .chart-tooltip-content { 4 | background-color: $color-grey-black; 5 | color: white; 6 | font-size: 12px; 7 | line-height: 18px; 8 | padding: 10px; 9 | } -------------------------------------------------------------------------------- /ui/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from 'layout/App'; 4 | 5 | import 'utils/fonts/fonts.scss'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); -------------------------------------------------------------------------------- /charts/apiclarity/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: postgresql 3 | repository: https://charts.bitnami.com/bitnami 4 | version: 11.6.12 5 | digest: sha256:7e88a69169c5e51d72d1dfef2c6a5eb6dfb3540799cebdb9cf80dd6bf257257f 6 | generated: "2022-07-05T10:04:45.539315+02:00" 7 | -------------------------------------------------------------------------------- /ui/src/components/Form/form-fields/ToggleField/toggle-field.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .ps-field-wrapper.ps-toogle-field-wrapper { 4 | display: flex; 5 | align-items: center; 6 | 7 | label { 8 | margin: 0; 9 | } 10 | } -------------------------------------------------------------------------------- /ui/src/components/Title/title.scss: -------------------------------------------------------------------------------- 1 | .main-title { 2 | font-size: 35px; 3 | line-height: 41px; 4 | font-weight: 200; 5 | margin-bottom: 24px; 6 | display: inline-block; 7 | 8 | &.small { 9 | font-size: 26px; 10 | line-height: 30px; 11 | } 12 | } -------------------------------------------------------------------------------- /ui/src/components/Title/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import './title.scss'; 5 | 6 | const Title = ({children, small}) => ( 7 |
{children}
8 | ); 9 | 10 | export default Title; -------------------------------------------------------------------------------- /ui/src/hooks/usePrevious.js: -------------------------------------------------------------------------------- 1 | import { useRef, useEffect } from 'react'; 2 | 3 | function usePrevious(value) { 4 | const ref = useRef(); 5 | 6 | useEffect(() => { 7 | ref.current = value; 8 | }); 9 | 10 | return ref.current; 11 | } 12 | 13 | export default usePrevious; -------------------------------------------------------------------------------- /ui/src/modules/fuzzer/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Fuzzer", 3 | "version": "0.1.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "Fuzzer", 9 | "version": "0.1.0" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /plugins/gateway/f5-bigip/F5BigIPBundle.template/ApiClarityAgent/src/config.yaml: -------------------------------------------------------------------------------- 1 | apiclarity-url: "" 2 | apiclarity-token: "" 3 | apiclarity-cert-path: ../apiclarity.crt 4 | apiclarity-cert-hostname: apiclarity 5 | refresh-interval-seconds: 30 6 | remote-log-port: 10514 7 | remote-log-proto: UDP 8 | debug: true 9 | -------------------------------------------------------------------------------- /plugins/otel-collector/apiclarityexporter/testdata/bad_empty_config.yaml: -------------------------------------------------------------------------------- 1 | receivers: 2 | nop: 3 | 4 | processors: 5 | nop: 6 | 7 | exporters: 8 | apiclarity: 9 | 10 | service: 11 | pipelines: 12 | traces: 13 | receivers: [nop] 14 | processors: [nop] 15 | exporters: [apiclarity] 16 | -------------------------------------------------------------------------------- /ui/src/modules/traceanalyzer/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TraceAnalyzer", 3 | "version": "0.1.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "TraceAnalyzer", 9 | "version": "0.1.0" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ui/src/components/CloseButton/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Icon, { ICON_NAMES } from 'components/Icon'; 3 | 4 | import './close-button.scss'; 5 | 6 | const CloseButton = ({onClose}) => ( 7 | 8 | ) 9 | 10 | export default CloseButton; -------------------------------------------------------------------------------- /ui/src/components/CloseButton/close-button.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .close-button { 4 | position: absolute; 5 | right: 20px; 6 | color: $color-main; 7 | cursor: pointer; 8 | 9 | &:hover:not(:disabled), 10 | &:focus:not(:disabled) { 11 | color: $color-main; 12 | } 13 | } -------------------------------------------------------------------------------- /charts/apiclarity/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.apiclarity.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "apiclarity.serviceAccountName" . }} 6 | namespace: '{{ .Release.Namespace }}' 7 | labels: 8 | {{ include "apiclarity.labels" . }} 9 | {{- end -}} 10 | -------------------------------------------------------------------------------- /ui/src/layout/Inventory/inventory.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .inventory-tables-page { 4 | .page-container { 5 | position: relative; 6 | 7 | .pagination-container { 8 | position: absolute; 9 | top: 10px; 10 | right: 20px; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /charts/apiclarity/templates/traffic_sources/tap/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.trafficSource.tap.enabled }} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "apiclarity-taper.name" . }} 6 | namespace: '{{ .Release.Namespace }}' 7 | labels: 8 | {{ include "apiclarity-taper.labels" . }} 9 | {{- end }} 10 | -------------------------------------------------------------------------------- /ui/src/modules/fuzzer/TestItemDisplay/test-item-display.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .fuzzing-test-display-item { 4 | display: flex; 5 | justify-content: space-between; 6 | align-items: center; 7 | font-weight: 700; 8 | font-size: 11px; 9 | line-height: 16px; 10 | color: $color-main; 11 | } 12 | -------------------------------------------------------------------------------- /ui/src/modules/fuzzer/index.js: -------------------------------------------------------------------------------- 1 | import { MODULE_TYPES } from '../MODULE_TYPES.js'; 2 | import FuzzingTab from './FuzzingTab'; 3 | 4 | const pluginAPIDetails = { 5 | name: 'Testing', 6 | component: FuzzingTab, 7 | endpoint: '/fuzzer', 8 | type: MODULE_TYPES.INVENTORY_DETAILS 9 | }; 10 | 11 | export { 12 | pluginAPIDetails 13 | }; 14 | -------------------------------------------------------------------------------- /plugins/gateway/kong/deploy/kongPlugin.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: configuration.konghq.com/v1 2 | kind: KongPlugin 3 | metadata: 4 | name: apiclarity-plugin 5 | plugin: kong-plugin 6 | config: 7 | host: {{UPSTREAM_TELEMETRY_HOST}} 8 | trace_sampling_enabled: {{TRACE_SAMPLING_ENABLED}} 9 | enable_tls: {{ENABLE_TLS}} 10 | trace_source_token: {{TRACE_SOURCE_TOKEN}} -------------------------------------------------------------------------------- /ui/src/components/Form/form-fields/TimeField/time-field.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .ps-field-wrapper.ps-time-field-wrapper { 4 | .time-input { 5 | width: 100px !important; 6 | height: 38px; 7 | text-align: center; 8 | border: 1px solid #ced4da; 9 | border-radius: 4px; 10 | } 11 | } -------------------------------------------------------------------------------- /ui/src/components/PageContainer/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import './page-container.scss'; 5 | 6 | const PageContainer = ({children, className}) => ( 7 |
8 | {children} 9 |
10 | ); 11 | 12 | export default PageContainer; -------------------------------------------------------------------------------- /ui/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "APIClarity", 3 | "name": "APIClarity", 4 | "icons": [ 5 | { 6 | "src": "favicon.png", 7 | "sizes": "any", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#ffffff", 14 | "background_color": "#ffffff" 15 | } -------------------------------------------------------------------------------- /ui/src/components/Text/text.scss: -------------------------------------------------------------------------------- 1 | .ag-text-wrapper { 2 | &.with-top-margin, 3 | &.with-bottom-margin { 4 | display: inline-block; 5 | } 6 | &.with-top-margin { 7 | margin-top: 30px; 8 | } 9 | &.with-bottom-margin { 10 | margin-bottom: 40px; 11 | } 12 | &.clickable { 13 | cursor: pointer; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /plugins/gateway/f5-bigip/F5BigIPBundle.template/ApiClarityAgent/deploy/docker/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | APICLARITY_AGENT_IMAGE=apiclarity-bigip-agent 4 | 5 | docker run -d \ 6 | -v ${PWD}/../config.yaml:/config.yaml --env CONFIG_PATH=/config.yaml \ 7 | -v ${PWD}/../apiclarity.crt:/apiclarity.crt \ 8 | -p 10514:10514/udp \ 9 | ${APICLARITY_AGENT_IMAGE} 10 | -------------------------------------------------------------------------------- /ui/src/modules/fuzzer/NewTestForm/new-test-forms.scss: -------------------------------------------------------------------------------- 1 | .new-fuzzing-test-form { 2 | .new-test-alert { 3 | margin-bottom: 50px; 4 | margin-top: 15px; 5 | } 6 | .basic-auth-fields { 7 | display: flex; 8 | justify-content: space-between; 9 | 10 | .ps-field-wrapper { 11 | width: 48%; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ui/src/components/ToggleButton/toggle-button.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .toggle-button-wrapper { 4 | display: inline-flex; 5 | align-items: center; 6 | height: 30px; 7 | cursor: pointer; 8 | 9 | .toggle-button-title { 10 | font-size: 14px; 11 | line-height: 19px; 12 | color: $color-grey-black; 13 | } 14 | } -------------------------------------------------------------------------------- /api/server/restapi/doc.go: -------------------------------------------------------------------------------- 1 | // Code generated by go-swagger; DO NOT EDIT. 2 | 3 | // Package restapi APIClarity APIs 4 | // 5 | // Schemes: 6 | // http 7 | // Host: localhost 8 | // BasePath: /api 9 | // Version: 1.0.0 10 | // 11 | // Consumes: 12 | // - application/json 13 | // 14 | // Produces: 15 | // - application/json 16 | // 17 | // swagger:meta 18 | package restapi 19 | -------------------------------------------------------------------------------- /plugins/Dockerfile.tyk.v3.2.2: -------------------------------------------------------------------------------- 1 | FROM tykio/tyk-plugin-compiler:v3.2.2 AS builder 2 | 3 | WORKDIR /go/src 4 | 5 | COPY api ./api 6 | 7 | COPY common ./common 8 | 9 | WORKDIR /plugin-source/ 10 | 11 | COPY gateway/tyk/v3.2.2/* ./. 12 | 13 | RUN /build.sh plugin.so 1 14 | 15 | FROM busybox 16 | WORKDIR /plugins 17 | COPY --from=builder ["/plugin-source/plugin.so", "./tyk-plugin.so"] 18 | 19 | -------------------------------------------------------------------------------- /plugins/gateway/f5-bigip/F5BigIPBundle.template/ApiClarityAgent/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.8.7-slim-buster 2 | 3 | # Copy local code to the container image. 4 | ENV APP_HOME /app 5 | WORKDIR $APP_HOME 6 | 7 | COPY ./requirements.txt requirements.txt 8 | 9 | RUN pip3 install -r requirements.txt 10 | COPY src ./ 11 | 12 | EXPOSE 10514/udp 13 | 14 | ENTRYPOINT ["python3", "APIClarityAgent.py"] -------------------------------------------------------------------------------- /ui/src/hooks/index.js: -------------------------------------------------------------------------------- 1 | import useFetch, { FETCH_METHODS } from './useFetch'; 2 | import usePrevious from './usePrevious'; 3 | import useProgressLoaderReducer, { LOADER_ACTIONS as PROGRESS_LOADER_ACTIONS } from './useProgressLoaderReducer'; 4 | 5 | export { 6 | FETCH_METHODS, 7 | PROGRESS_LOADER_ACTIONS, 8 | useFetch, 9 | usePrevious, 10 | useProgressLoaderReducer 11 | } 12 | -------------------------------------------------------------------------------- /ui/src/modules/demoModule/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { MODULE_TYPES } from '../MODULE_TYPES.js'; 3 | 4 | const DemoModule = () => { 5 | return ( 6 |
Demo Module
7 | ); 8 | }; 9 | 10 | export default { 11 | name: 'Demo Module', 12 | component: DemoModule, 13 | endpoint: '/demomodule', 14 | type: MODULE_TYPES.EVENT_DETAILS 15 | }; 16 | -------------------------------------------------------------------------------- /ui/src/components/Table/utils.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Icon, { ICON_NAMES } from 'components/Icon'; 3 | 4 | export const EmptyValue = () => ( 5 | 6 | ); 7 | 8 | export const StatusIndicatorIcon = ({isSuccess}) => ( 9 | isSuccess ? : 10 | ); -------------------------------------------------------------------------------- /ui/src/layout/TraceSources/trace-sources.scss: -------------------------------------------------------------------------------- 1 | @import "utils/scss_variables.module.scss"; 2 | 3 | .trace-source-table-page-container { 4 | padding: 1rem; 5 | 6 | .trace-sources-type-cell { 7 | font-style: normal; 8 | font-weight: 400; 9 | font-size: 14px; 10 | line-height: 19px; 11 | display: flex; 12 | align-items: center; 13 | 14 | color: $color-grey-dark; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /plugins/api/server/restapi/doc.go: -------------------------------------------------------------------------------- 1 | // Code generated by go-swagger; DO NOT EDIT. 2 | 3 | // Package restapi APIClarity Plugins telemetries API 4 | // 5 | // Schemes: 6 | // http 7 | // Host: localhost 8 | // BasePath: /api 9 | // Version: 1.0.0 10 | // 11 | // Consumes: 12 | // - application/json 13 | // 14 | // Produces: 15 | // - application/json 16 | // 17 | // swagger:meta 18 | package restapi 19 | -------------------------------------------------------------------------------- /ui/src/components/MessageTextButton/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from 'components/Button'; 3 | 4 | import './message-text-button.scss'; 5 | 6 | const MessageTextButton = ({children, onClick, disabled}) => ( 7 | 10 | ) 11 | 12 | export default MessageTextButton; 13 | -------------------------------------------------------------------------------- /charts/apiclarity/templates/secret.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: {{ index .Values "apiclarity-postgresql" "auth" "existingSecret" }} 5 | namespace: '{{ .Release.Namespace }}' 6 | labels: 7 | {{ include "apiclarity.labels" . }} 8 | annotations: 9 | helm.sh/hook: pre-install 10 | helm.sh/hook-weight: "1" 11 | data: 12 | postgres-password: {{ .Values.global.databasePassword | b64enc }} 13 | -------------------------------------------------------------------------------- /ui/src/components/Filter/filter-fields/TextField.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import { useField } from 'formik'; 4 | 5 | const TextField = ({className, ...props}) => { 6 | const [field] = useField(props); 7 | 8 | return ( 9 | 10 | ) 11 | } 12 | 13 | export default TextField; -------------------------------------------------------------------------------- /ui/src/components/Tag/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import COLORS from 'utils/scss_variables.module.scss'; 5 | import './tag.scss'; 6 | 7 | const Tag = ({children, rounded, color=COLORS["color-main"]}) => ( 8 |
{children}
9 | ) 10 | 11 | export default Tag; -------------------------------------------------------------------------------- /plugins/taper/extensions/http/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/openclarity/apiclarity/plugins/taper/extensions/http 2 | 3 | go 1.17 4 | 5 | require ( 6 | github.com/beevik/etree v1.1.0 7 | github.com/up9inc/mizu/tap/api v0.0.0-20211107103142-4badaadcc134 8 | golang.org/x/net v0.0.0-20211101193420-4a448f8816b3 9 | ) 10 | 11 | require ( 12 | github.com/google/martian v2.1.0+incompatible // indirect 13 | golang.org/x/text v0.3.7 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /charts/apiclarity/templates/traffic_sources/tap/clusterrole.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.trafficSource.tap.enabled .Values.apiclarity.rbac.create }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: {{ include "apiclarity-taper.name" . }} 6 | labels: 7 | {{ include "apiclarity-taper.labels" . }} 8 | rules: 9 | - apiGroups: [""] 10 | resources: ["pods"] 11 | verbs: ["get", "list", "watch"] 12 | {{- end}} 13 | -------------------------------------------------------------------------------- /ui/src/modules/bfla/AddClientBFLAField/add-client-bfla-field.scss: -------------------------------------------------------------------------------- 1 | .select-workload-wrapper { 2 | padding: 0px 20px 10px 20px; 3 | 4 | .select-workload-label { 5 | font-weight: bold; 6 | font-size: 12px; 7 | margin-bottom: 5px; 8 | } 9 | 10 | .select-workload-input-filed { 11 | width: 100%; 12 | } 13 | 14 | .select-workload-add-client-button { 15 | margin-top: 10px; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /plugins/gateway/apigeex/sharedflowbundle.template/sharedflows/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Key-Value-Map-Operations-Get-APIClarity-Tracing 5 | 6 | 7 | JavaScript-APIClarity-Tracing 8 | 9 | 10 | Key-Value-Map-Operations-Update-APIClarity-Tracing 11 | 12 | 13 | -------------------------------------------------------------------------------- /ui/src/components/StatusIndicator/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import './status-indicator.scss'; 5 | 6 | const StatusIndicator = ({title, isError}) => ( 7 |
8 |
9 |
{title}
10 |
11 | ); 12 | 13 | export default StatusIndicator; -------------------------------------------------------------------------------- /plugins/kuma/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /ui/src/components/Icon/icon.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | $icon-size: 22px; 4 | 5 | .icon { 6 | display: inline-block; 7 | width: $icon-size; 8 | height: $icon-size; 9 | stroke-width: 0; 10 | stroke: currentColor; 11 | fill: currentColor; 12 | 13 | &.clickable:not(.disabled) { 14 | cursor: pointer; 15 | } 16 | &.disabled { 17 | cursor: not-allowed; 18 | color: $color-grey; 19 | } 20 | } -------------------------------------------------------------------------------- /ui/src/components/BackRouteButton/back-route-button.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | $arrow-size: 20px; 4 | 5 | .back-route-button { 6 | color: $color-main; 7 | display: flex; 8 | align-items: center; 9 | font-size: 18px; 10 | line-height: 18px; 11 | cursor: pointer; 12 | margin-bottom: 24px; 13 | 14 | .icon { 15 | margin-right: 14px; 16 | height: $arrow-size; 17 | width: $arrow-size; 18 | } 19 | } -------------------------------------------------------------------------------- /ui/src/components/NoResultsDisplay/no-results-display.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .empty-results-display-wrapper { 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | 8 | .no-results-title { 9 | font-size: 18px; 10 | line-height: 22px; 11 | color: $color-main; 12 | margin-bottom: 40px; 13 | } 14 | .no-results-image.is-small { 15 | max-width: 110px; 16 | } 17 | } -------------------------------------------------------------------------------- /ui/src/components/StatusIndicator/status-indicator.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .status-indicator-wrapper { 4 | display: flex; 5 | align-items: center; 6 | 7 | .status-indicator { 8 | width: 4px; 9 | height: 4px; 10 | border-radius: 50px; 11 | background-color: $color-success; 12 | margin-right: 13px; 13 | 14 | &.error { 15 | background-color: $color-error; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /plugins/api/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/openclarity/apiclarity/plugins/api 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/go-openapi/errors v0.20.1 7 | github.com/go-openapi/loads v0.21.0 8 | github.com/go-openapi/runtime v0.21.0 9 | github.com/go-openapi/spec v0.20.4 10 | github.com/go-openapi/strfmt v0.21.0 11 | github.com/go-openapi/swag v0.19.15 12 | github.com/go-openapi/validate v0.20.3 13 | github.com/jessevdk/go-flags v1.5.0 14 | golang.org/x/net v0.0.0-20211101193420-4a448f8816b3 15 | ) 16 | -------------------------------------------------------------------------------- /ui/src/components/MainTitleWithRefresh/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Title from 'components/Title'; 3 | import Icon, { ICON_NAMES } from 'components/Icon'; 4 | 5 | import './main-title-with-refresh.scss'; 6 | 7 | const MainTitleWithRefresh = ({title, onRefreshClick}) => ( 8 |
9 | {title} 10 | 11 |
12 | ) 13 | 14 | export default MainTitleWithRefresh; -------------------------------------------------------------------------------- /backend/pkg/modules/assets/traceanalyzer/sensitive_rules/sensitive_rules.yaml: -------------------------------------------------------------------------------- 1 | - id: private-ip 2 | description: Private IP address in headers 3 | regex: '(^192\.168\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])$)|(^172\.([1][6-9]|[2][0-9]|[3][0-1])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])$)|(^10\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])\.([0-9]|[0-9][0-9]|[0-2][0-5][0-5])$)' 4 | searchIn: 5 | - RequestHeaders 6 | - ResponseHeaders 7 | -------------------------------------------------------------------------------- /ui/src/layout/Reviewer/ConfirmationModal/confirmation-modal.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .review-confirmation-modal { 4 | .approve-alert { 5 | display: flex; 6 | align-items: center; 7 | margin-top: 13px; 8 | margin-bottom: 35px; 9 | 10 | .icon { 11 | margin-right: 5px; 12 | color: $color-main; 13 | } 14 | } 15 | 16 | .dropdown-title { 17 | margin-top: 10px; 18 | margin-bottom: 5px; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ui/src/components/Loader/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { SpinnerCircularFixed } from 'spinners-react'; 3 | 4 | import COLORS from 'utils/scss_variables.module.scss'; 5 | import './loader.scss'; 6 | 7 | const Loader = () => ( 8 | 16 | ); 17 | 18 | export default Loader; -------------------------------------------------------------------------------- /ui/src/components/DotLoader/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import COLORS from 'utils/scss_variables.module.scss'; 4 | 5 | import './dot-loader.scss'; 6 | 7 | const Dot = ({color}) =>
; 8 | 9 | const DotLoader = ({color=COLORS["color-main"]}) => ( 10 |
11 | 12 | 13 | 14 |
15 | ); 16 | 17 | export default DotLoader; 18 | -------------------------------------------------------------------------------- /api/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -euo pipefail 4 | 5 | alias goswagger="docker run --rm -it --user $(id -u):$(id -g) -e GOPATH=$GOPATH:/go -v $HOME:$HOME -w $(pwd) quay.io/goswagger/swagger:v0.27.0" 6 | 7 | cp server/restapi/configure_api_clarity_a_p_is.go /tmp/configure_api_clarity_a_p_is.go 8 | rm -rf server/* 9 | rm -rf client/* 10 | goswagger generate server -f swagger.yaml -t ./server 11 | goswagger generate client -f swagger.yaml -t ./client 12 | cp /tmp/configure_api_clarity_a_p_is.go server/restapi/configure_api_clarity_a_p_is.go -------------------------------------------------------------------------------- /ui/src/components/Tag/tag.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .tag-wrapper { 4 | display: inline-block; 5 | 6 | .tag-container { 7 | color: white; 8 | text-transform: uppercase; 9 | padding: 5px 10px; 10 | font-size: 12px; 11 | line-height: 18px; 12 | display: inline-block; 13 | 14 | &.rounded { 15 | padding: 5px; 16 | font-size: 14px; 17 | line-height: 14px; 18 | border-radius: 2px; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /api3/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | (cd ../tools/spec-aggregator && go run main.go) 4 | (cd ./common && go generate) 5 | (cd ./global && go generate) 6 | (cd ./notifications && go generate) 7 | 8 | if [[ $1 == "--verify" ]] ; then 9 | diffs=$(git status --porcelain) 10 | if [[ ${diffs} != "" ]]; then 11 | echo "Verification Failed: the spec aggregation and the code generation was not run on the latest version of the specs" 12 | git diff 13 | echo "Please run 'make api3' and commit again" 14 | exit 1 15 | fi 16 | fi 17 | -------------------------------------------------------------------------------- /ui/src/modules/fuzzer/EmptyFuzzingDisplay/empty-fuzzing-display.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .fuzzing-disabled-message-wrapper { 4 | .fuzzing-disabled-message { 5 | width: 320px; 6 | text-align: center; 7 | 8 | .fuzzing-disabled-message-content { 9 | font-weight: 400; 10 | font-size: 11px; 11 | line-height: 16px; 12 | color: $color-grey-black; 13 | margin-top: 20px; 14 | } 15 | } 16 | img { 17 | width: 202px; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /backend/pkg/modules/internal/traceanalyzer/sensitive/sensitive_test_01.yaml: -------------------------------------------------------------------------------- 1 | # https://github.com/google/re2/wiki/Syntax 2 | - id: simple-001 3 | description: Find 'username' keyword in flow data 4 | regex: '(?i)username' 5 | searchIn: 6 | - RequestBody # Allowed values: RequestBody, ResponseBody, RequestHeaders, ResponseHeaders 7 | - ResponseBody 8 | - RequestHeaders 9 | - ResponseHeaders 10 | 11 | - id: core-002 12 | description: Find 'API Key' keyword in Request Headers 13 | regex: '(?i)api-?key' 14 | searchIn: 15 | - RequestHeaders 16 | -------------------------------------------------------------------------------- /ui/preinstall.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var resolve = require('path').resolve; 3 | var join = require('path').join; 4 | var cp = require('child_process'); 5 | 6 | var lib = resolve(__dirname, './src/modules'); 7 | fs.readdirSync(lib) 8 | .forEach(function(mod) { 9 | var modPath = join(lib, mod); 10 | 11 | // ensure path has package.json 12 | if (!fs.existsSync(join(modPath, 'package.json'))) return; 13 | 14 | // install folder 15 | cp.spawn('npm', ['i'], { env: process.env, cwd: modPath, stdio: 'inherit' }); 16 | }); 17 | -------------------------------------------------------------------------------- /charts/apiclarity/templates/clusterrolebinding.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.apiclarity.rbac.create -}} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRoleBinding 4 | metadata: 5 | name: {{ include "apiclarity.name" . }} 6 | labels: 7 | {{ include "apiclarity.labels" . }} 8 | roleRef: 9 | apiGroup: rbac.authorization.k8s.io 10 | kind: ClusterRole 11 | name: {{ include "apiclarity.name" . }} 12 | subjects: 13 | - kind: ServiceAccount 14 | name: {{ include "apiclarity.serviceAccountName" . }} 15 | namespace: '{{ .Release.Namespace }}' 16 | {{- end -}} 17 | -------------------------------------------------------------------------------- /ui/src/components/MethodWithRiskDisplay/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import TitleWithRiskDisplay from 'components/TitleWithRiskDisplay'; 3 | 4 | export const MethodWithRiskDisplay = ({path, method, risk, customRiskDisplay, alertDisplay}) => ( 5 | {method}{path}} 7 | risk={risk} 8 | customRiskDisplay={customRiskDisplay} 9 | alertDisplay={alertDisplay} 10 | /> 11 | ); 12 | 13 | export default MethodWithRiskDisplay; 14 | -------------------------------------------------------------------------------- /ui/src/components/Form/form-fields/TextAreaField/text-area-field.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .ps-field-wrapper.ps-text-area-wrapper { 4 | textarea { 5 | width: 100%; 6 | color: $color-grey-black; 7 | outline: none; 8 | border: 1px solid $color-grey-light; 9 | border-radius: 2px; 10 | padding: 10px; 11 | resize: none; 12 | height: 150px; 13 | font-size: 12px; 14 | 15 | &:focus { 16 | box-shadow: 0px 0px 5px rgba(2, 188, 234, 0.5); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /plugins/taper/README.md: -------------------------------------------------------------------------------- 1 | ## APIClarity Passive Tapper Traffic Source 2 | 3 | ### Installation using a pre-built image 4 | 5 | #### Helm installation 6 | * Save APIClarity default chart values 7 | ```shell 8 | helm show values apiclarity/apiclarity > values.yaml 9 | ``` 10 | * Update the values in `trafficSource.tap` 11 | * Deploy or Upgrade APIClarity 12 | ```shell 13 | helm upgrade --values values.yaml --create-namespace apiclarity apiclarity/apiclarity -n apiclarity --install 14 | ``` 15 | * An APIClarity Tap DaemonSet will we deployed to your cluster and will tap the provided namespaces. 16 | -------------------------------------------------------------------------------- /ui/src/components/Form/form-fields/SelectField/select-field.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .ps-field-wrapper.ps-select-field-wrapper { 4 | .selector-wrapper { 5 | position: relative; 6 | 7 | .single-select__control { 8 | border-color: $color-grey-light; 9 | border-radius: 2px; 10 | } 11 | .single-select__control--is-focused { 12 | box-shadow: 0px 0px 5px rgba(2, 188, 234, 0.5); 13 | } 14 | .single-select__menu { 15 | z-index: 2; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /charts/apiclarity/templates/service-lb.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.apiclarity.tls.enabled .Values.supportExternalTraceSource.enabled }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: {{ include "apiclarity.name" . }}-external 6 | namespace: '{{ .Release.Namespace }}' 7 | labels: 8 | {{ include "apiclarity.labels" . }} 9 | spec: 10 | ports: 11 | - name: https-external-authenticated-trace-server 12 | port: 10443 13 | protocol: TCP 14 | targetPort: 10443 15 | selector: 16 | app: {{ include "apiclarity.name" . }} 17 | type: LoadBalancer 18 | {{- end }} -------------------------------------------------------------------------------- /charts/apiclarity/templates/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.apiclarity.rbac.create -}} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: RoleBinding 4 | metadata: 5 | name: {{ include "apiclarity.name" . }} 6 | namespace: '{{ .Release.Namespace }}' 7 | labels: 8 | {{ include "apiclarity.labels" . }} 9 | roleRef: 10 | apiGroup: rbac.authorization.k8s.io 11 | kind: Role 12 | name: {{ include "apiclarity.name" . }} 13 | subjects: 14 | - kind: ServiceAccount 15 | name: {{ include "apiclarity.serviceAccountName" . }} 16 | namespace: '{{ .Release.Namespace }}' 17 | {{- end -}} 18 | -------------------------------------------------------------------------------- /charts/apiclarity/templates/traffic_sources/tap/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Name of the chart. 4 | */}} 5 | {{- define "apiclarity-taper.name" -}} 6 | {{- printf "%s-%s-%s" .Release.Name .Chart.Name "taper" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Helm labels. 11 | */}} 12 | {{- define "apiclarity-taper.labels" -}} 13 | app.kubernetes.io/name: {{ include "apiclarity.name" . }}-taper 14 | app.kubernetes.io/managed-by: {{ .Release.Service }} 15 | app.kubernetes.io/instance: {{ .Release.Name }} 16 | helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} 17 | {{- end -}} 18 | -------------------------------------------------------------------------------- /charts/apiclarity/templates/role.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.apiclarity.rbac.create -}} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | name: {{ include "apiclarity.name" . }} 6 | namespace: '{{ .Release.Namespace }}' 7 | labels: 8 | {{ include "apiclarity.labels" . }} 9 | rules: 10 | # needed for trace sampling manger & fuzzer 11 | - apiGroups: [""] 12 | resources: ["secrets"] 13 | verbs: ["get", "create", "update", "delete"] 14 | # needed for fuzzer 15 | - apiGroups: [""] 16 | resources: ["configmaps"] 17 | verbs: ["get", "list", "watch"] 18 | 19 | {{- end -}} 20 | -------------------------------------------------------------------------------- /plugins/api/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -euo pipefail 4 | 5 | alias goswagger="docker run --rm -it --user $(id -u):$(id -g) -e GOPATH=$GOPATH:/go -v $HOME:$HOME -w $(pwd) quay.io/goswagger/swagger:v0.27.0" 6 | 7 | rm -rf client/* 8 | goswagger generate client -f swagger.yaml -t ./client 9 | 10 | cp server/restapi/configure_api_clarity_plugins_telemetries_api.go /tmp/configure_api_clarity_plugins_telemetries_api.go 11 | rm -rf server/* 12 | goswagger generate server -f swagger.yaml -t ./server 13 | cp /tmp/configure_api_clarity_plugins_telemetries_api.go server/restapi/configure_api_clarity_plugins_telemetries_api.go -------------------------------------------------------------------------------- /ui/src/components/BackRouteButton/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useHistory } from 'react-router-dom'; 3 | import Arrow, { ARROW_NAMES } from 'components/Arrow'; 4 | 5 | import './back-route-button.scss'; 6 | 7 | const BackRouteButton = ({title, path, query}) => { 8 | const history = useHistory(); 9 | 10 | return ( 11 |
history.push({pathname: path, query})}> 12 | 13 |
{title}
14 |
15 | ) 16 | } 17 | 18 | export default BackRouteButton; -------------------------------------------------------------------------------- /ui/src/components/NoResultsDisplay/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import noResultsImage from 'utils/images/empty.svg'; 5 | 6 | import './no-results-display.scss'; 7 | 8 | const NoResultsDisplay = ({title, isSmall=false}) => { 9 | return ( 10 |
11 |
{title}
12 | no results 13 |
14 | ) 15 | } 16 | 17 | export default NoResultsDisplay; -------------------------------------------------------------------------------- /ui/src/components/MethodTag/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Tag from 'components/Tag'; 3 | 4 | import COLORS from 'utils/scss_variables.module.scss'; 5 | 6 | const COLOR_MAPPING = { 7 | POST: COLORS["color-success"], 8 | GET: COLORS["color-main-light"], 9 | PUT: COLORS["color-warning"], 10 | PATCH: COLORS["color-status-blue"], 11 | OPTIONS: COLORS["color-main"], 12 | HEAD: COLORS["color-status-violet"], 13 | DELETE: COLORS["color-error"] 14 | } 15 | 16 | const MethodTag = ({method}) => ( 17 | {method} 18 | ) 19 | 20 | export default MethodTag; -------------------------------------------------------------------------------- /charts/apiclarity/templates/clusterrole.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.apiclarity.rbac.create -}} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: {{ include "apiclarity.name" . }} 6 | labels: 7 | {{ include "apiclarity.labels" . }} 8 | rules: 9 | - apiGroups: [""] 10 | resources: ["nodes", "services", "pods"] 11 | verbs: ["get", "list", "watch"] 12 | - apiGroups: ["apps"] 13 | resources: ["replicasets", "daemonsets", "deployments"] 14 | verbs: ["get", "list", "watch"] 15 | - apiGroups: [ "batch" ] 16 | resources: [ "jobs" ] 17 | verbs: [ "create", "get", "delete" ] 18 | {{- end -}} 19 | -------------------------------------------------------------------------------- /ui/src/layout/Inventory/InventoryDetails/MessageImageDisplay/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import './message-image-display.scss'; 5 | 6 | const MessageImageDisplay = ({message, subMessage, image, className}) => ( 7 |
8 |
{message}
9 | {!!subMessage &&
{subMessage}
} 10 | message 11 |
12 | ) 13 | 14 | export default MessageImageDisplay; 15 | -------------------------------------------------------------------------------- /plugins/otel-collector/scripts/modify_otelcol_builder.awk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | { 3 | if (/output_path/) { 4 | print " output_path: ."; 5 | } else if (/exporters:/) { 6 | print $0, "\n", 7 | " - gomod: github.com/openclarity/apiclarity/plugins/otel-collector/apiclarityexporter v0.0.0"; 8 | } else { 9 | print; 10 | } 11 | } 12 | END { 13 | print "\nreplaces:\n", 14 | " - github.com/openclarity/apiclarity/plugins/otel-collector/apiclarityexporter v0.0.0 => ./otel-collector/apiclarityexporter\n", 15 | " - github.com/openclarity/apiclarity/plugins/api v0.0.0 => ./api\n"; 16 | } -------------------------------------------------------------------------------- /charts/apiclarity/templates/traffic_sources/tap/clusterrolebinding.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.trafficSource.tap.enabled .Values.apiclarity.rbac.create }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRoleBinding 4 | metadata: 5 | name: {{ include "apiclarity-taper.name" . }} 6 | labels: 7 | {{ include "apiclarity-taper.labels" . }} 8 | roleRef: 9 | apiGroup: rbac.authorization.k8s.io 10 | kind: ClusterRole 11 | name: {{ include "apiclarity-taper.name" . }} 12 | subjects: 13 | - kind: ServiceAccount 14 | name: {{ include "apiclarity-taper.name" . }} 15 | namespace: '{{ .Release.Namespace }}' 16 | {{- end }} 17 | -------------------------------------------------------------------------------- /ui/src/components/TitleValueDisplay/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import './title-value-display.scss'; 5 | 6 | export const TitleValueDisplayRow = ({children}) => ( 7 |
{children}
8 | ); 9 | 10 | const TitleValueDisplay = ({title, children, className}) => ( 11 |
12 |
{title}
13 |
{children}
14 |
15 | ); 16 | 17 | export default TitleValueDisplay -------------------------------------------------------------------------------- /ui/src/components/Notification/notification.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .notification-wrapper { 4 | position: absolute; 5 | top: 0; 6 | left: 0; 7 | right: 0; 8 | background-color: $color-blue; 9 | color: $color-grey-black; 10 | height: 50px; 11 | font-size: 12px; 12 | line-height: 18px; 13 | display: flex; 14 | align-items: center; 15 | padding: 0 30px; 16 | filter: drop-shadow(0px 5px 10px rgba(34, 43, 54, 0.11)); 17 | 18 | &.error { 19 | background-color: $color-error-light; 20 | } 21 | .notification-content { 22 | width: 100%; 23 | } 24 | } -------------------------------------------------------------------------------- /plugins/Dockerfile.kong: -------------------------------------------------------------------------------- 1 | FROM golang:1.17.8-alpine3.14 AS builder 2 | 3 | ## Note: this Dockerfile will only be built from the plugins context 4 | 5 | RUN apk add --update --no-cache gcc g++ 6 | 7 | WORKDIR /plugins 8 | COPY api ./api 9 | 10 | WORKDIR /plugins/common 11 | 12 | COPY common/go.* ./ 13 | RUN go mod download 14 | 15 | COPY common ./ 16 | 17 | WORKDIR /plugins/gateway/kong 18 | COPY gateway/kong/go.* ./ 19 | 20 | RUN go mod download 21 | 22 | COPY gateway/kong . 23 | 24 | # Build the plugin. 25 | RUN go build -o bin/kong-plugin plugin.go 26 | 27 | FROM busybox 28 | COPY --from=builder ["/plugins/gateway/kong/bin/kong-plugin", "/kong-plugin"] 29 | -------------------------------------------------------------------------------- /ui/src/components/Form/form-fields/YesNoToggleField/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import RadioField from '../RadioField'; 4 | 5 | import './yes-no-toggle-field.scss'; 6 | 7 | const YesNoToggleField = ({className, ...props}) => { 8 | return ( 9 | 18 | ) 19 | } 20 | 21 | export default YesNoToggleField; -------------------------------------------------------------------------------- /charts/apiclarity/templates/pvc.yaml: -------------------------------------------------------------------------------- 1 | kind: PersistentVolumeClaim 2 | apiVersion: v1 3 | metadata: 4 | name: {{ include "apiclarity.name" . }}-pvc 5 | namespace: '{{ .Release.Namespace }}' 6 | labels: 7 | {{ include "apiclarity.labels" . }} 8 | spec: 9 | accessModes: 10 | - ReadWriteOnce 11 | resources: 12 | requests: 13 | storage: '{{ .Values.global.persistentVolume.size }}' 14 | {{- if .Values.global.persistentVolume.storageClass }} 15 | {{- if (eq "-" .Values.global.persistentVolume.storageClass) }} 16 | storageClassName: "" 17 | {{- else }} 18 | storageClassName: '{{ .Values.global.persistentVolume.storageClass }}' 19 | {{- end }} 20 | {{- end }} -------------------------------------------------------------------------------- /ui/src/layout/Inventory/InventoryDetails/MessageImageDisplay/message-image-display.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .message-image-display-wrapper { 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | flex-direction: column; 8 | flex-grow: 1; 9 | padding: 60px 30px 30px 30px; 10 | 11 | .message-image-display-message { 12 | font-size: 18px; 13 | color: $color-main; 14 | } 15 | .message-image-display-sub-message { 16 | font-size: 12px; 17 | color: $color-main; 18 | } 19 | img { 20 | width: 300px; 21 | margin-top: 60px; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ui/src/components/TitleWithRiskDisplay/title-with-risk-display.scss: -------------------------------------------------------------------------------- 1 | .title-with-risk-display { 2 | display: flex; 3 | align-items: center; 4 | justify-content: space-between; 5 | font-size: 11px; 6 | font-weight: 700; 7 | 8 | .title-with-risk-display-risk-wrapper { 9 | display: flex; 10 | align-items: center; 11 | 12 | .title-with-risk-display-alert { 13 | margin-right: 10px; 14 | } 15 | .title-with-risk-display-title { 16 | white-space: nowrap; 17 | overflow: hidden; 18 | text-overflow: ellipsis; 19 | margin-right: 2px; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ui/src/components/ModalConfirmation/modal-confirmation.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .modal-confirmation { 4 | .confirmation-actions-container { 5 | position: absolute; 6 | bottom: 20px; 7 | right: 20px; 8 | 9 | .confirmation-title { 10 | font-size: 34px; 11 | line-height: 45px; 12 | font-weight: bold; 13 | text-transform: none; 14 | } 15 | .confirmation-cancel-button { 16 | margin-right: 10px; 17 | } 18 | .confirmation-confirmation-button.alert { 19 | background-color: $color-error; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ui/src/components/ColorByRisk/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import { API_RISK_ITEMS } from 'utils/systemConsts'; 4 | 5 | const ColorByRisk = ({tag : Tag='div', risk, withLabel=false, children, labelSuffix="", isText=true}) => { 6 | const formattedRisk = risk || API_RISK_ITEMS.UNKNOWN.value; 7 | const riskClassName = classnames("global-risk-color", {text: isText}, formattedRisk.toLowerCase()); 8 | 9 | return ( 10 | 11 | {withLabel ? `${API_RISK_ITEMS[formattedRisk].label} ${labelSuffix}` : children} 12 | 13 | ) 14 | } 15 | 16 | export default ColorByRisk; 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /ui/src/layout/Reviewer/GeneralFilter.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Filter, { OPERATORS, METHOD_ITEMS, formatFiltersToQueryParams } from 'components/Filter'; 3 | 4 | export { 5 | formatFiltersToQueryParams 6 | } 7 | 8 | export const FILTERS_MAP = { 9 | method: {value: "method", label: "Method", valuesMapItems: METHOD_ITEMS, operators: [ 10 | {...OPERATORS.is, valueItems: METHOD_ITEMS, creatable: false} 11 | ]}, 12 | path: {value: "path", label: "Path", operators: [ 13 | {...OPERATORS.contains, valueItems: [], creatable: true} 14 | ]}, 15 | } 16 | 17 | const GeneralFilter = props => (); 18 | 19 | export default GeneralFilter; -------------------------------------------------------------------------------- /charts/apiclarity/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: apiclarity 3 | appVersion: latest 4 | description: Charts for APIClarity deployment. Reconstruct OpenAPI Specifications from real-time workload traffic seamlessly. 5 | version: latest 6 | home: https://apiclarity.io/ 7 | icon: https://github.com/openclarity/apiclarity/raw/master/API_clarity.svg 8 | sources: 9 | - https://github.com/openclarity/apiclarity 10 | maintainers: 11 | - name: API Clarity 12 | url: https://apiclarity.io 13 | type: application 14 | dependencies: 15 | - name: postgresql 16 | version: "11.6.12" 17 | repository: https://charts.bitnami.com/bitnami 18 | condition: apiclarity-postgresql.enabled 19 | alias: apiclarity-postgresql 20 | -------------------------------------------------------------------------------- /tools/spec-aggregator/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/openclarity/apiclarity/tools/spec-aggregator 2 | 3 | go 1.17 4 | 5 | require ( 6 | github.com/getkin/kin-openapi v0.97.0 7 | github.com/ghodss/yaml v1.0.0 8 | github.com/sirupsen/logrus v1.8.1 9 | ) 10 | 11 | require ( 12 | github.com/go-openapi/jsonpointer v0.19.5 // indirect 13 | github.com/go-openapi/swag v0.21.1 // indirect 14 | github.com/invopop/yaml v0.1.0 // indirect 15 | github.com/josharian/intern v1.0.0 // indirect 16 | github.com/mailru/easyjson v0.7.6 // indirect 17 | github.com/stretchr/testify v1.7.0 // indirect 18 | golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d // indirect 19 | gopkg.in/yaml.v2 v2.4.0 // indirect 20 | gopkg.in/yaml.v3 v3.0.1 // indirect 21 | ) 22 | -------------------------------------------------------------------------------- /ui/src/modules/bfla/DataCollectionScreen/data-collection-bfla.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | 4 | .data-collection-container-bfla { 5 | height: 70vh; 6 | display: flex; 7 | align-items: center; 8 | justify-content: center; 9 | flex-direction: column; 10 | 11 | 12 | .data-collection-title-bfla { 13 | font-size: 20px; 14 | margin-bottom: 20px; 15 | color: $color-main; 16 | } 17 | 18 | .data-collection-subtitle-bfla { 19 | font-size: 11px; 20 | margin-bottom: 20px; 21 | line-height: 16px; 22 | text-align: center; 23 | color: 'black'; 24 | overflow-wrap: break-word; 25 | inline-size: 370px; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ui/src/components/Accordion/accordion.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .accordion-wrapper { 4 | .accordion-header { 5 | display: flex; 6 | justify-content: space-between; 7 | align-items: center; 8 | padding: 14px 0; 9 | border-bottom: 1px solid $color-grey-light; 10 | font-size: 11px; 11 | 12 | &:not(.is-empty) { 13 | cursor: pointer; 14 | } 15 | .accordion-title { 16 | display: flex; 17 | align-items: center; 18 | 19 | .icon { 20 | margin-right: 5px; 21 | } 22 | > span { 23 | padding-top: 2px; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ui/src/components/Checkbox/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | import './checkbox.scss'; 5 | 6 | const Checkbox = ({checked, name, title, onChange, className, halfSelected, disabled}) => ( 7 |
8 | 13 |
14 | ); 15 | 16 | export default Checkbox; 17 | -------------------------------------------------------------------------------- /backend/pkg/modules/assets/traceanalyzer/sensitive_rules/sensitive_rules_1.yaml: -------------------------------------------------------------------------------- 1 | - id: core-001 2 | description: "'password' keyword in flow data" 3 | regex: '(?i)password' 4 | searchIn: # Allowed values: RequestBody, ResponseBody, RequestHeaders, ResponseHeaders 5 | - RequestBody 6 | - ResponseBody 7 | - RequestHeaders 8 | - ResponseHeaders 9 | 10 | - id: core-002 11 | description: HTTP Headers contains information about backend 12 | regex: '(?i)x-powered-by' 13 | searchIn: 14 | - RequestHeaders 15 | - ResponseHeaders 16 | 17 | - id: core-003 18 | description: HTTP Headers contains information about running server 19 | regex: '(?i)server' 20 | searchIn: 21 | - RequestHeaders 22 | - ResponseHeaders 23 | -------------------------------------------------------------------------------- /backend/pkg/modules/assets/bfla/BFLA_FSM.dot: -------------------------------------------------------------------------------- 1 | digraph BFLA_FSM { 2 | 3 | Start->Learning [label=startLearning, color=green] 4 | Learning->Learnt [label=stopLearning, color=red] 5 | Learning->Detecting[label=startDetection] 6 | Learning->Start[label=reset, color=red] 7 | Learnt->Start [label=reset] 8 | Learnt->Detecting [label=startDetection, color=green] 9 | Learnt->Learning [label=startLearning, color=green] 10 | Detecting->Learnt [label=stopDetection, color=red] 11 | Detecting->Start [label=reset, color=red] 12 | Detecting->Learning [label=startLearning] 13 | Learnt->Learnt[label=updateModel] 14 | Detecting->Detecting[label=updateModel] 15 | 16 | a [label="red=disable traces \n green=enable traces\nblack=no changes in tracing status", shape="box"] 17 | } 18 | -------------------------------------------------------------------------------- /ui/src/components/DisplaySection/display-section.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .display-section-wrapper { 4 | .section-title-wrapper { 5 | margin: 20px 0; 6 | display: flex; 7 | align-items: center; 8 | justify-content: space-between; 9 | cursor: pointer; 10 | 11 | &.with-padding { 12 | padding: 20px 0; 13 | } 14 | &.with-close-toggle .section-title { 15 | color: $color-main; 16 | } 17 | &:not(.hide-underline) { 18 | border-bottom: 1px solid $color-grey-light; 19 | } 20 | .section-title { 21 | font-weight: 700; 22 | font-size: 12px; 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /ui/src/components/Arrow/arrow.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .arrow-icon { 4 | transition: transform .2s ease-in-out; 5 | 6 | &:not(.small) { 7 | &.right-arrow { 8 | transform: rotate(180deg); 9 | } 10 | 11 | &.bottom-arrow { 12 | transform: rotate(-90deg); 13 | } 14 | 15 | &.top-arrow { 16 | transform: rotate(90deg); 17 | } 18 | } 19 | 20 | &.small { 21 | &.right-arrow { 22 | transform: rotate(180deg); 23 | } 24 | 25 | &.bottom-arrow { 26 | transform: rotate(-90deg); 27 | } 28 | 29 | &.top-arrow { 30 | transform: rotate(90deg); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /ui/src/components/Form/form-fields/utils.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import InfoIcon from 'components/InfoIcon'; 4 | 5 | export const FieldLabel = ({children, tooltipId, tooltipText, className}) => ( 6 |
7 | 8 | {!!tooltipText && } 9 |
10 | ); 11 | 12 | export const FieldDescription = ({children}) => ( 13 |
{children}
14 | ); 15 | 16 | export const FieldError = ({children}) => ( 17 |
{children}
18 | ) -------------------------------------------------------------------------------- /ui/src/components/RoundIconContainer/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import Icon from 'components/Icon'; 4 | 5 | import './round-icon-container.scss'; 6 | 7 | const RoundIconContainer = ({name, onClick, className, small=false, disabled}) => { 8 | const containerClassName = classnames( 9 | "round-icon-container", 10 | {clickable: !!onClick}, 11 | {[className]: className, small}, 12 | {disabled: disabled} 13 | ); 14 | 15 | return ( 16 |
disabled || !onClick ? undefined : onClick(event)}> 17 | 18 |
19 | ); 20 | }; 21 | 22 | export default RoundIconContainer; 23 | -------------------------------------------------------------------------------- /ui/src/layout/Reviewer/utils.js: -------------------------------------------------------------------------------- 1 | export const SEPARATOR = "/"; 2 | 3 | export const checkIsParam = section => section.startsWith("{") && section.endsWith("}"); 4 | 5 | export const getPathWithParamInIndex = (path, index, paramName) => { 6 | const pathList = path.split(SEPARATOR); 7 | 8 | if (pathList.length <= index) { 9 | return path; 10 | } 11 | 12 | const updatedPathList = [ 13 | ...pathList.slice(0, index), 14 | `{${paramName}}`, 15 | ...pathList.slice(index + 1) 16 | ]; 17 | 18 | return updatedPathList.join(SEPARATOR); 19 | } 20 | 21 | export const getMethodsFromPaths = paths => ( 22 | [...new Set(paths.reduce((acc, curr) => { 23 | return [...acc, ...curr.methods]; 24 | }, []))] 25 | ) -------------------------------------------------------------------------------- /ui/src/components/DownloadJsonButton/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ICON_NAMES } from 'components/Icon'; 3 | import IconWithTitle from 'components/IconWithTitle'; 4 | 5 | const DownloadJsonButton = ({title, fileName, data}) => { 6 | const downloadFile = () => { 7 | const file = new Blob([JSON.stringify(data, null, 2)], {type: "text/plain"}); 8 | 9 | const element = document.createElement("a"); 10 | element.href = URL.createObjectURL(file); 11 | element.download = `${fileName}.json`; 12 | element.click(); 13 | }; 14 | 15 | return ( 16 | 17 | ); 18 | }; 19 | 20 | export default DownloadJsonButton; 21 | -------------------------------------------------------------------------------- /backend/pkg/common/common.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2021 Cisco Systems, Inc. and its affiliates. 2 | // All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | package common 17 | 18 | var Empty struct{} 19 | -------------------------------------------------------------------------------- /plugins/api/client/models/hosts_list.go: -------------------------------------------------------------------------------- 1 | // Code generated by go-swagger; DO NOT EDIT. 2 | 3 | package models 4 | 5 | // This file was generated by the swagger tool. 6 | // Editing this file might prove futile when you re-run the swagger generate command 7 | 8 | import ( 9 | "context" 10 | 11 | "github.com/go-openapi/strfmt" 12 | ) 13 | 14 | // HostsList List of hosts 15 | // 16 | // swagger:model HostsList 17 | type HostsList []string 18 | 19 | // Validate validates this hosts list 20 | func (m HostsList) Validate(formats strfmt.Registry) error { 21 | return nil 22 | } 23 | 24 | // ContextValidate validates this hosts list based on context it is used 25 | func (m HostsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /plugins/api/server/models/hosts_list.go: -------------------------------------------------------------------------------- 1 | // Code generated by go-swagger; DO NOT EDIT. 2 | 3 | package models 4 | 5 | // This file was generated by the swagger tool. 6 | // Editing this file might prove futile when you re-run the swagger generate command 7 | 8 | import ( 9 | "context" 10 | 11 | "github.com/go-openapi/strfmt" 12 | ) 13 | 14 | // HostsList List of hosts 15 | // 16 | // swagger:model HostsList 17 | type HostsList []string 18 | 19 | // Validate validates this hosts list 20 | func (m HostsList) Validate(formats strfmt.Registry) error { 21 | return nil 22 | } 23 | 24 | // ContextValidate validates this hosts list based on context it is used 25 | func (m HostsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /ui/src/components/TitleValueDisplay/title-value-display.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .title-value-display-wrapper { 4 | min-width: 220px; 5 | 6 | .title-value-display-title { 7 | font-weight: bold; 8 | font-size: 12px; 9 | line-height: 14px; 10 | color: $color-grey-black; 11 | text-transform: uppercase; 12 | margin-bottom: 10px; 13 | } 14 | .title-value-display-content { 15 | font-size: 14px; 16 | color: $color-grey-dark; 17 | word-wrap: break-word; 18 | } 19 | } 20 | 21 | .title-value-display-row { 22 | display: flex; 23 | margin-bottom: 40px; 24 | 25 | .title-value-display-wrapper:not(:last-child) { 26 | margin-right: 10px; 27 | } 28 | } -------------------------------------------------------------------------------- /ui/src/components/IconWithTitle/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import Icon from 'components/Icon'; 4 | 5 | import './icon-with-title.scss'; 6 | 7 | const IconWithTitle = (props) => { 8 | const {title, onClick, className, ...iconProps} = props; 9 | const {disabled, name} = props; 10 | 11 | return ( 12 |
!disabled && onClick ? onClick(event) : null} 15 | > 16 |
{title}
17 |
18 | ); 19 | } 20 | 21 | export default IconWithTitle; 22 | -------------------------------------------------------------------------------- /ui/src/components/ModalConfirmation/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import Modal from 'components/Modal'; 4 | import Text, { TEXT_TYPES } from 'components/Text'; 5 | 6 | import './modal-confirmation.scss'; 7 | 8 | const ModalConfirmation = ({ title, message, confirmTitle, onCancle, onConfirm, loading, className }) => ( 9 | 18 | {message} 19 | 20 | ); 21 | 22 | export default ModalConfirmation; 23 | -------------------------------------------------------------------------------- /ui/src/components/Modal/utils.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | export const ModalSection = ({ title, className, children }) => ( 5 |
6 |
{title}
7 |
8 | {children} 9 |
10 |
11 | ); 12 | 13 | export const ModalTitleDataItem = ({ title, className, children }) => ( 14 |
15 |
{title}
16 |
17 | {children} 18 |
19 |
20 | ); 21 | -------------------------------------------------------------------------------- /ui/src/components/SideDrawer/utils.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | export const ModalSection = ({title, className, children}) => ( 5 |
6 |
{title}
7 |
8 | {children} 9 |
10 |
11 | ); 12 | 13 | export const ModalTitleDataItem = ({title, className, children}) => ( 14 |
15 |
{title}
16 |
17 | {children} 18 |
19 |
20 | ); 21 | -------------------------------------------------------------------------------- /ui/src/components/TableSimple/table-simple.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .table-simple { 4 | width: 100%; 5 | 6 | &.no-border { 7 | thead { 8 | border: none; 9 | } 10 | tbody td { 11 | border: none; 12 | } 13 | } 14 | thead { 15 | font-weight: bold; 16 | font-size: 9px; 17 | text-transform: uppercase; 18 | color: $color-main; 19 | border-bottom: 1px solid $color-main; 20 | 21 | th { 22 | padding: 10px; 23 | } 24 | } 25 | tbody { 26 | font-size: 11px; 27 | 28 | td { 29 | border: 1px solid $color-grey-light; 30 | border-top: none; 31 | padding: 10px; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ui/src/layout/Reviewer/MergeModal/merge-modal.scss: -------------------------------------------------------------------------------- 1 | .merge-modal { 2 | .select-wrapper { 3 | margin: 10px 0; 4 | max-height: 150px; 5 | overflow-y: auto; 6 | 7 | .checkbox-list-select-wrapper .ag-checkbox-wrapper .ag-checkbox { 8 | align-items: flex-start; 9 | 10 | .merge-review-path-display { 11 | .merge-review-path-display-path { 12 | display: inline-flex; 13 | flex-wrap: wrap; 14 | } 15 | .merge-review-path-display-methods { 16 | margin-top: 10px; 17 | 18 | .tag-wrapper { 19 | margin-right: 5px; 20 | } 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /backend/pkg/common/trace_source.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2022 Cisco Systems, Inc. and its affiliates. 2 | // All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | package common 17 | 18 | const ( 19 | DefaultTraceSourceID uint = 0 20 | ) 21 | -------------------------------------------------------------------------------- /charts/apiclarity/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Thank you for installing {{ .Chart.Name | upper }}. 2 | 3 | Your release is named {{ .Release.Name }}. 4 | 5 | Here is how to access the APIClarity UI: 6 | 7 | $ kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "apiclarity.name" . }} 9999:8080 8 | $ Open APIClarity UI in the browser: http://localhost:9999/ 9 | $ Generate some traffic in the applications in the traced namespaces and check the APIClarity UI :) 10 | 11 | 12 | 13 | {{- if .Values.trafficSource.tyk.enabled }} 14 | 15 | 16 | Note: Tyk traffic source is enabled. 17 | Follow the instructions in https://github.com/openclarity/apiclarity/tree/{{ .Chart.AppVersion }}/plugins/gateway/tyk to configure the Tyk API definitions to use the APIClarity plugin. 18 | {{- end }} 19 | -------------------------------------------------------------------------------- /ui/src/components/VulnerabilityIcon/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import Icon, { ICON_NAMES } from 'components/Icon'; 4 | import {SYSTEM_RISKS} from 'utils/utils'; 5 | 6 | const VulnerabilityIcon = ({severity, onClick, showSuccess=true, showUnknown=false}) => { 7 | // const severityClass = severity.toLowerCase(); 8 | const severityClass = severity.toUpperCase(); 9 | 10 | return ( 11 | 17 | ); 18 | } 19 | 20 | export default VulnerabilityIcon 21 | -------------------------------------------------------------------------------- /plugins/taper/version/consts.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2021 Cisco Systems, Inc. and its affiliates. 2 | // All rights reserved. 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | package version 17 | 18 | // overridden using ldflags. 19 | var ( 20 | Version string 21 | ) 22 | -------------------------------------------------------------------------------- /ui/src/components/KeyValueList/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Icon from 'components/Icon'; 3 | 4 | import './key-value-list.scss'; 5 | 6 | const KeyValueItem = ({label, value, icon, hideEmpty=false}) => ( 7 |
8 |
{label}
9 |
10 |
{!!value || value === 0 ? value : (hideEmpty ? "" : 'N/A')}
11 | {!!icon && } 12 |
13 |
14 | ) 15 | 16 | const KeyValueList = ({items}) => ( 17 |
18 | {items.map((item, index) => )} 19 |
20 | ); 21 | 22 | export default KeyValueList; 23 | -------------------------------------------------------------------------------- /ui/src/components/Table/ColumnsSelectPanel/columns-select-panel.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .columns-select-panel-container { 4 | height: 100%; 5 | position: absolute; 6 | top: 0; 7 | right: 0; 8 | width: 230px; 9 | padding: 15px; 10 | background-color: $color-white; 11 | border: 1px solid $color-grey-lighter; 12 | overflow-y: scroll; 13 | z-index: 3; 14 | 15 | .header-columns-wrapper { 16 | .header-column-title { 17 | text-transform: uppercase; 18 | color: $color-main; 19 | margin-bottom: 10px; 20 | font-weight: bold; 21 | font-size: 9px; 22 | } 23 | .header-columns { 24 | margin-left: 30px; 25 | margin-bottom: 20px; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /plugins/gateway/tyk/v3.2.2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/openclarity/apiclarity/plugins/gateway/tyk 2 | 3 | go 1.16 4 | 5 | // From here: https://tyk.io/docs/plugins/supported-languages/golang/#plugin-development-flow 6 | replace github.com/jensneuse/graphql-go-tools => github.com/TykTechnologies/graphql-go-tools v1.6.2-0.20211112130051-ad1e36a78a9a 7 | 8 | require ( 9 | github.com/TykTechnologies/tyk v1.9.2-0.20211119141645-a642669fba58 10 | github.com/gin-gonic/gin v1.7.0 // indirect 11 | github.com/go-openapi/strfmt v0.21.0 12 | github.com/openclarity/apiclarity/plugins/api v0.0.0 13 | github.com/openclarity/apiclarity/plugins/common v0.0.0 14 | ) 15 | 16 | replace github.com/openclarity/apiclarity/plugins/api v0.0.0 => ./../../../api 17 | 18 | replace github.com/openclarity/apiclarity/plugins/common v0.0.0 => ./../../../common 19 | -------------------------------------------------------------------------------- /ui/src/components/DotLoader/dot-loader.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .dot-loader-wrapper { 4 | display: flex; 5 | 6 | .loader-dot { 7 | margin: 1px; 8 | width: 4px; 9 | height: 4px; 10 | border-radius: 50%; 11 | transform: scale(0.5); 12 | animation: scale-dot 1.2s ease-out infinite; 13 | &:nth-of-type(2) { 14 | animation-delay: 0.2s; 15 | } 16 | &:nth-of-type(3) { 17 | animation-delay: 0.3s; 18 | } 19 | } 20 | } 21 | 22 | @keyframes scale-dot { 23 | 0% { 24 | transform: scale(0.5); 25 | } 26 | 25% { 27 | transform: scale(1); 28 | } 29 | 75% { 30 | transform: scale(0.5); 31 | } 32 | 100% { 33 | transform: scale(0.5); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ui/src/components/IconWithTitle/icon-with-title.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .icon-container { 4 | display: inline-flex; 5 | align-items: center; 6 | padding: 5px; 7 | white-space: nowrap; 8 | 9 | .icon-title { 10 | float: left; 11 | margin-left: 5px; 12 | font-weight: bold; 13 | font-size: 10px; 14 | line-height: 22px; 15 | } 16 | .arrow-icon { 17 | margin: 0 5px 4px 10px; 18 | } 19 | &:not(.disabled) { 20 | .icon { 21 | color: $color-main; 22 | } 23 | } 24 | &.disabled { 25 | cursor: not-allowed; 26 | 27 | .icon, 28 | .icon-title { 29 | color: $color-grey; 30 | } 31 | } 32 | &.clickable { 33 | cursor: pointer; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ui/src/layout/Inventory/InventoryDetails/Specs/MethodHitCount/method-hit-count.scss: -------------------------------------------------------------------------------- 1 | @import 'utils/scss_variables.module.scss'; 2 | 3 | .method-hit-count-wrapper { 4 | margin: 40px 30px 15px 30px; 5 | 6 | .hit-count-title { 7 | font-weight: bold; 8 | font-size: 14px; 9 | line-height: 14px; 10 | color: $color-main; 11 | padding: 15px 0; 12 | border-bottom: 1px solid $color-grey-light; 13 | } 14 | .hit-count-content { 15 | margin: 30px 0; 16 | position: relative; 17 | 18 | .time-filter-wrapper { 19 | position: absolute; 20 | top: 0; 21 | right: 0; 22 | } 23 | .hit-count-chart-wrapper { 24 | width: 100%; 25 | height: 300px; 26 | padding-top: 50px; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /ui/src/components/Form/form-fields/TextAreaField/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { isEmpty } from 'lodash'; 3 | import { Field } from 'formik'; 4 | import { FieldLabel, FieldError } from '../utils'; 5 | 6 | import './text-area-field.scss'; 7 | 8 | const TextAreaField = ({name, label, tooltipText, placeholder, disabled, validate}) => ( 9 | 10 | {({field, meta}) => { 11 | return ( 12 |
13 | {!isEmpty(label) && {label}} 14 |