├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ ├── issues.yaml │ ├── jobs.yaml │ └── vulncheck.yaml ├── .gitignore ├── .golangci.bck.yml ├── .golangci.yml ├── .license.tmpl ├── .nvmrc ├── .prettierrc.json ├── .semgrepignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── CREDITS ├── DEVELOPMENT.md ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── SECURITY.md ├── VULNERABILITY_REPORT.md ├── api ├── admin_client_mock.go ├── admin_objects.go ├── admin_objects_test.go ├── client-admin.go ├── client.go ├── client_test.go ├── config.go ├── config_test.go ├── configure_console.go ├── configure_console_test.go ├── consts.go ├── custom-server.go ├── doc.go ├── embedded_spec.go ├── errors.go ├── errors_test.go ├── logs.go ├── logs_test.go ├── operations │ ├── auth │ │ ├── login.go │ │ ├── login_detail.go │ │ ├── login_detail_parameters.go │ │ ├── login_detail_responses.go │ │ ├── login_detail_urlbuilder.go │ │ ├── login_parameters.go │ │ ├── login_responses.go │ │ ├── login_urlbuilder.go │ │ ├── logout.go │ │ ├── logout_parameters.go │ │ ├── logout_responses.go │ │ ├── logout_urlbuilder.go │ │ ├── session_check.go │ │ ├── session_check_parameters.go │ │ ├── session_check_responses.go │ │ └── session_check_urlbuilder.go │ ├── bucket │ │ ├── bucket_info.go │ │ ├── bucket_info_parameters.go │ │ ├── bucket_info_responses.go │ │ ├── bucket_info_urlbuilder.go │ │ ├── get_bucket_quota.go │ │ ├── get_bucket_quota_parameters.go │ │ ├── get_bucket_quota_responses.go │ │ ├── get_bucket_quota_urlbuilder.go │ │ ├── get_bucket_rewind.go │ │ ├── get_bucket_rewind_parameters.go │ │ ├── get_bucket_rewind_responses.go │ │ ├── get_bucket_rewind_urlbuilder.go │ │ ├── get_bucket_versioning.go │ │ ├── get_bucket_versioning_parameters.go │ │ ├── get_bucket_versioning_responses.go │ │ ├── get_bucket_versioning_urlbuilder.go │ │ ├── get_max_share_link_exp.go │ │ ├── get_max_share_link_exp_parameters.go │ │ ├── get_max_share_link_exp_responses.go │ │ ├── get_max_share_link_exp_urlbuilder.go │ │ ├── list_buckets.go │ │ ├── list_buckets_parameters.go │ │ ├── list_buckets_responses.go │ │ ├── list_buckets_urlbuilder.go │ │ ├── make_bucket.go │ │ ├── make_bucket_parameters.go │ │ ├── make_bucket_responses.go │ │ ├── make_bucket_urlbuilder.go │ │ ├── set_bucket_versioning.go │ │ ├── set_bucket_versioning_parameters.go │ │ ├── set_bucket_versioning_responses.go │ │ └── set_bucket_versioning_urlbuilder.go │ ├── console_api.go │ ├── license │ │ ├── license_acknowledge.go │ │ ├── license_acknowledge_parameters.go │ │ ├── license_acknowledge_responses.go │ │ └── license_acknowledge_urlbuilder.go │ ├── object │ │ ├── delete_multiple_objects.go │ │ ├── delete_multiple_objects_parameters.go │ │ ├── delete_multiple_objects_responses.go │ │ ├── delete_multiple_objects_urlbuilder.go │ │ ├── delete_object.go │ │ ├── delete_object_parameters.go │ │ ├── delete_object_responses.go │ │ ├── delete_object_urlbuilder.go │ │ ├── download_multiple_objects.go │ │ ├── download_multiple_objects_parameters.go │ │ ├── download_multiple_objects_responses.go │ │ ├── download_multiple_objects_urlbuilder.go │ │ ├── download_object.go │ │ ├── download_object_parameters.go │ │ ├── download_object_responses.go │ │ ├── download_object_urlbuilder.go │ │ ├── get_object_metadata.go │ │ ├── get_object_metadata_parameters.go │ │ ├── get_object_metadata_responses.go │ │ ├── get_object_metadata_urlbuilder.go │ │ ├── list_objects.go │ │ ├── list_objects_parameters.go │ │ ├── list_objects_responses.go │ │ ├── list_objects_urlbuilder.go │ │ ├── post_buckets_bucket_name_objects_upload.go │ │ ├── post_buckets_bucket_name_objects_upload_parameters.go │ │ ├── post_buckets_bucket_name_objects_upload_responses.go │ │ ├── post_buckets_bucket_name_objects_upload_urlbuilder.go │ │ ├── put_object_restore.go │ │ ├── put_object_restore_parameters.go │ │ ├── put_object_restore_responses.go │ │ ├── put_object_restore_urlbuilder.go │ │ ├── put_object_tags.go │ │ ├── put_object_tags_parameters.go │ │ ├── put_object_tags_responses.go │ │ ├── put_object_tags_urlbuilder.go │ │ ├── share_object.go │ │ ├── share_object_parameters.go │ │ ├── share_object_responses.go │ │ └── share_object_urlbuilder.go │ ├── public │ │ ├── download_shared_object.go │ │ ├── download_shared_object_parameters.go │ │ ├── download_shared_object_responses.go │ │ └── download_shared_object_urlbuilder.go │ └── system │ │ ├── admin_info.go │ │ ├── admin_info_parameters.go │ │ ├── admin_info_responses.go │ │ └── admin_info_urlbuilder.go ├── policy │ ├── policies.go │ └── policies_test.go ├── public_objects.go ├── public_objects_test.go ├── server.go ├── tls.go ├── user_bucket_quota.go ├── user_buckets.go ├── user_buckets_test.go ├── user_login.go ├── user_login_test.go ├── user_logout.go ├── user_logout_test.go ├── user_objects.go ├── user_objects_test.go ├── user_session.go ├── user_session_test.go ├── user_watch.go ├── user_watch_test.go ├── utils.go ├── utils_test.go ├── ws_handle.go ├── ws_handle_test.go └── ws_objects.go ├── cmd └── console │ ├── app_commands.go │ ├── main.go │ ├── server.go │ └── update.go ├── code_of_conduct.md ├── cross-compile.sh ├── docs └── ldap │ └── billy.ldif ├── generator.config.js ├── go.mod ├── go.sum ├── hack ├── header.go.txt └── update-codegen.sh ├── images ├── pic1-a.png ├── pic1-b.png ├── pic2-a.png ├── pic2-b.png ├── pic3-a.png └── pic3-b.png ├── integration ├── buckets_test.go ├── login_test.go ├── objects_test.go ├── profiling_test.go ├── sample-import-config.txt └── user_api_bucket_test.go ├── models ├── admin_info_response.go ├── api_error.go ├── backend_properties.go ├── bucket.go ├── bucket_access.go ├── bucket_object.go ├── bucket_quota.go ├── bucket_versioning_response.go ├── delete_file.go ├── environment_constants.go ├── get_bucket_retention_config.go ├── list_buckets_response.go ├── list_objects_response.go ├── login_details.go ├── login_request.go ├── login_response.go ├── logout_request.go ├── make_bucket_request.go ├── make_buckets_response.go ├── max_share_link_exp_response.go ├── metadata.go ├── object_retention_mode.go ├── object_retention_unit.go ├── permission_resource.go ├── principal.go ├── put_object_tags_request.go ├── redirect_rule.go ├── result_target.go ├── rewind_item.go ├── rewind_response.go ├── server_drives.go ├── server_properties.go ├── session_response.go ├── set_bucket_versioning.go ├── widget.go └── widget_result.go ├── pkg ├── auth │ ├── idp.go │ ├── idp │ │ └── oauth2 │ │ │ ├── config.go │ │ │ ├── const.go │ │ │ ├── provider.go │ │ │ └── proxy.go │ ├── ldap.go │ ├── token.go │ ├── token │ │ ├── config.go │ │ └── const.go │ ├── token_test.go │ └── utils │ │ ├── utils.go │ │ └── utils_test.go ├── build-constants.go ├── certs │ ├── certs.go │ └── const.go ├── http │ ├── headers.go │ └── http.go ├── kes │ └── kes.go ├── logger │ ├── audit.go │ ├── color │ │ └── color.go │ ├── config.go │ ├── config │ │ ├── bool-flag.go │ │ ├── bool-flag_test.go │ │ ├── certs.go │ │ └── config.go │ ├── console.go │ ├── const.go │ ├── logger.go │ ├── logger_test.go │ ├── logonce.go │ ├── message │ │ ├── audit │ │ │ ├── entry.go │ │ │ └── entry_test.go │ │ └── log │ │ │ └── entry.go │ ├── reqinfo.go │ ├── target │ │ ├── http │ │ │ └── http.go │ │ └── types │ │ │ └── types.go │ ├── targets.go │ └── utils.go └── utils │ ├── parity.go │ ├── parity_test.go │ ├── utils.go │ └── utils_test.go ├── policies └── mcsTestUserAddOnly.json ├── semgrep.yaml ├── swagger.yml ├── systemd ├── README.md └── console.service ├── verify-gofmt.sh ├── web-app ├── .dockerignore ├── .gitignore ├── .prettierignore ├── .yarnrc.yml ├── Makefile ├── README.md ├── assets.go ├── build │ ├── Loader.svg │ ├── agpl-logo.svg │ ├── agpl.svg │ ├── amazon.png │ ├── amqp-logo.svg │ ├── amqp.png │ ├── android-icon-144x144.png │ ├── android-icon-192x192.png │ ├── android-icon-36x36.png │ ├── android-icon-48x48.png │ ├── android-icon-72x72.png │ ├── android-icon-96x96.png │ ├── apple-icon-180x180.png │ ├── asset-manifest.json │ ├── aws-logo.svg │ ├── azure-logo.svg │ ├── azure.png │ ├── elasticsearch-logo.svg │ ├── elasticsearch.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon-96x96.png │ ├── favicon.ico │ ├── gcs-logo.svg │ ├── gcs.png │ ├── images │ │ ├── BG_Illustration.svg │ │ ├── BG_IllustrationDarker.svg │ │ ├── background-wave-orig.svg │ │ ├── background-wave-orig2.svg │ │ ├── background.svg │ │ ├── ob_bucket_clear.svg │ │ ├── ob_bucket_filled.svg │ │ ├── ob_file_clear.svg │ │ ├── ob_file_filled.svg │ │ ├── ob_folder_clear.svg │ │ ├── ob_folder_filled.svg │ │ ├── object-browser-folder-icn.svg │ │ ├── object-browser-icn.svg │ │ ├── search-icn.svg │ │ └── trash-icn.svg │ ├── index.html │ ├── kafka-logo.svg │ ├── kafka.png │ ├── lambda-rect.svg │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ ├── minio-logo.svg │ ├── minioTier.png │ ├── mqtt-logo.svg │ ├── mqtt.png │ ├── mysql-logo.svg │ ├── mysql.png │ ├── nats-logo.svg │ ├── nats.png │ ├── nsq-logo.svg │ ├── postgres-logo.svg │ ├── postgres.png │ ├── redis-logo.svg │ ├── redis.png │ ├── robots.txt │ ├── safari-pinned-tab.svg │ ├── scripts │ │ └── pdf.worker.min.mjs │ ├── static │ │ ├── css │ │ │ ├── main.e60e4760.css │ │ │ └── main.e60e4760.css.map │ │ ├── js │ │ │ ├── 153.c862e9a6.chunk.js │ │ │ ├── 153.c862e9a6.chunk.js.map │ │ │ ├── 6.304df09b.chunk.js │ │ │ ├── 6.304df09b.chunk.js.map │ │ │ ├── 704.08d49eab.chunk.js │ │ │ ├── 704.08d49eab.chunk.js.map │ │ │ ├── 755.769f8547.chunk.js │ │ │ ├── 755.769f8547.chunk.js.map │ │ │ ├── 774.6415c182.chunk.js │ │ │ ├── 774.6415c182.chunk.js.map │ │ │ ├── 805.c3d46c58.chunk.js │ │ │ ├── 805.c3d46c58.chunk.js.LICENSE.txt │ │ │ ├── 805.c3d46c58.chunk.js.map │ │ │ ├── 868.84f9ff08.chunk.js │ │ │ ├── 868.84f9ff08.chunk.js.LICENSE.txt │ │ │ ├── 868.84f9ff08.chunk.js.map │ │ │ ├── 88.3f29d160.chunk.js │ │ │ ├── 88.3f29d160.chunk.js.map │ │ │ ├── 941.97a59715.chunk.js │ │ │ ├── 941.97a59715.chunk.js.map │ │ │ ├── main.8ed8a7ba.js │ │ │ ├── main.8ed8a7ba.js.LICENSE.txt │ │ │ └── main.8ed8a7ba.js.map │ │ └── media │ │ │ ├── Inter-Black.15ca31c0a2a68f76d2d1.woff2 │ │ │ ├── Inter-Black.c6938660eec019fefd68.woff │ │ │ ├── Inter-BlackItalic.ca1e738e4f349f27514d.woff │ │ │ ├── Inter-BlackItalic.cb2a7335650c690077fe.woff2 │ │ │ ├── Inter-Bold.93c1301bd9f486c573b3.woff │ │ │ ├── Inter-Bold.ec64ea577b0349e055ad.woff2 │ │ │ ├── Inter-BoldItalic.2d26c56a606662486796.woff2 │ │ │ ├── Inter-BoldItalic.b376885042f6c961a541.woff │ │ │ ├── Inter-Italic.890025e726861dba417f.woff │ │ │ ├── Inter-Italic.cb10ffd7684cd9836a05.woff2 │ │ │ ├── Inter-Light.2d5198822ab091ce4305.woff2 │ │ │ ├── Inter-Light.994e34451cc19ede31d3.woff │ │ │ ├── Inter-LightItalic.ef9f65d91d2b0ba9b2e4.woff │ │ │ ├── Inter-LightItalic.f86952265d7b0f02c921.woff2 │ │ │ ├── Inter-Regular.8c206db99195777c6769.woff │ │ │ ├── Inter-Regular.c8ba52b05a9ef10f4758.woff2 │ │ │ ├── Inter-Thin.29b9c616a95a912abf73.woff │ │ │ ├── Inter-Thin.fff2a096db014f6239d4.woff2 │ │ │ ├── loginAnimationPoster.9aa924bfe619e71d5d29.png │ │ │ ├── placeholderimage.077ea48bd1ef1f4a883f.png │ │ │ └── videoBG.17363418b3c2246a0e27.mp4 │ ├── styles │ │ └── root-styles.css │ ├── verified.svg │ └── webhooks-logo.svg ├── check-deadcode.sh ├── check-prettier.sh ├── check-warnings-istanbul-coverage.sh ├── check-warnings.sh ├── config-overrides.js ├── e2e │ ├── auth.setup.ts │ ├── consts.ts │ ├── fixtures │ │ └── baseFixture.ts │ └── login.spec.ts ├── knip.config.ts ├── package.json ├── playwright.config.ts ├── playwright │ └── jobs.yaml ├── public │ ├── Loader.svg │ ├── agpl-logo.svg │ ├── agpl.svg │ ├── amazon.png │ ├── amqp-logo.svg │ ├── amqp.png │ ├── android-icon-144x144.png │ ├── android-icon-192x192.png │ ├── android-icon-36x36.png │ ├── android-icon-48x48.png │ ├── android-icon-72x72.png │ ├── android-icon-96x96.png │ ├── apple-icon-180x180.png │ ├── aws-logo.svg │ ├── azure-logo.svg │ ├── azure.png │ ├── elasticsearch-logo.svg │ ├── elasticsearch.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon-96x96.png │ ├── favicon.ico │ ├── gcs-logo.svg │ ├── gcs.png │ ├── images │ │ ├── BG_Illustration.svg │ │ ├── BG_IllustrationDarker.svg │ │ ├── background-wave-orig.svg │ │ ├── background-wave-orig2.svg │ │ ├── background.svg │ │ ├── ob_bucket_clear.svg │ │ ├── ob_bucket_filled.svg │ │ ├── ob_file_clear.svg │ │ ├── ob_file_filled.svg │ │ ├── ob_folder_clear.svg │ │ ├── ob_folder_filled.svg │ │ ├── object-browser-folder-icn.svg │ │ ├── object-browser-icn.svg │ │ ├── search-icn.svg │ │ └── trash-icn.svg │ ├── index.html │ ├── kafka-logo.svg │ ├── kafka.png │ ├── lambda-rect.svg │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ ├── minio-logo.svg │ ├── minioTier.png │ ├── mqtt-logo.svg │ ├── mqtt.png │ ├── mysql-logo.svg │ ├── mysql.png │ ├── nats-logo.svg │ ├── nats.png │ ├── nsq-logo.svg │ ├── postgres-logo.svg │ ├── postgres.png │ ├── redis-logo.svg │ ├── redis.png │ ├── robots.txt │ ├── safari-pinned-tab.svg │ ├── scripts │ │ └── pdf.worker.min.mjs │ ├── styles │ │ └── root-styles.css │ ├── verified.svg │ └── webhooks-logo.svg ├── src │ ├── MainRouter.tsx │ ├── ProtectedRoutes.tsx │ ├── StyleHandler.tsx │ ├── api │ │ ├── consoleApi.ts │ │ ├── errors.ts │ │ └── index.ts │ ├── common │ │ ├── Copyright.tsx │ │ ├── LoadingComponent.tsx │ │ ├── MoreLink.tsx │ │ ├── SecureComponent │ │ │ ├── SecureComponent.tsx │ │ │ ├── accessControl.ts │ │ │ ├── index.ts │ │ │ └── permissions.ts │ │ ├── api │ │ │ └── index.ts │ │ ├── types.ts │ │ └── utils.ts │ ├── config.ts │ ├── history.ts │ ├── index.css │ ├── index.tsx │ ├── logo.svg │ ├── placeholderimage.png │ ├── react-app-env.d.ts │ ├── screens │ │ ├── AnonymousAccess │ │ │ └── AnonymousAccess.tsx │ │ ├── Console │ │ │ ├── Buckets │ │ │ │ ├── BucketDetails │ │ │ │ │ ├── BrowserHandler.tsx │ │ │ │ │ └── bucketDetailsSlice.ts │ │ │ │ ├── Buckets.tsx │ │ │ │ └── ListBuckets │ │ │ │ │ ├── AddBucket │ │ │ │ │ ├── AddBucketModal.tsx │ │ │ │ │ ├── AddBucketName.tsx │ │ │ │ │ ├── addBucketThunks.ts │ │ │ │ │ └── addBucketsSlice.ts │ │ │ │ │ ├── Objects │ │ │ │ │ ├── ListObjects │ │ │ │ │ │ ├── CreatePathModal.tsx │ │ │ │ │ │ ├── DeleteMultipleObjects.tsx │ │ │ │ │ │ ├── DeleteNonCurrent.tsx │ │ │ │ │ │ ├── DeleteObject.tsx │ │ │ │ │ │ ├── DetailsListPanel.tsx │ │ │ │ │ │ ├── IconWithLabel.tsx │ │ │ │ │ │ ├── ListObjects.tsx │ │ │ │ │ │ ├── ListObjectsHelpers.tsx │ │ │ │ │ │ ├── ListObjectsTable.tsx │ │ │ │ │ │ ├── ObjectDetailPanel.tsx │ │ │ │ │ │ ├── RewindEnable.tsx │ │ │ │ │ │ ├── types.tsx │ │ │ │ │ │ └── utils.tsx │ │ │ │ │ ├── ObjectDetails │ │ │ │ │ │ ├── DeleteSelectedVersions.tsx │ │ │ │ │ │ ├── FileVersionItem.tsx │ │ │ │ │ │ ├── ObjectMetaData.tsx │ │ │ │ │ │ ├── RestoreFileVersion.tsx │ │ │ │ │ │ ├── ShareFile.tsx │ │ │ │ │ │ ├── SpecificVersionPill.tsx │ │ │ │ │ │ ├── TagsModal.tsx │ │ │ │ │ │ ├── VersionsNavigator.tsx │ │ │ │ │ │ └── types.ts │ │ │ │ │ ├── Preview │ │ │ │ │ │ ├── PreviewFileContent.tsx │ │ │ │ │ │ ├── PreviewFileModal.tsx │ │ │ │ │ │ └── PreviewPDF.tsx │ │ │ │ │ └── utils.ts │ │ │ │ │ ├── UploadFilesButton.tsx │ │ │ │ │ └── UploadPermissionUtils.ts │ │ │ ├── CommandBar.tsx │ │ │ ├── Common │ │ │ │ ├── Components │ │ │ │ │ ├── AutoColorIcon.tsx │ │ │ │ │ └── withSuspense.tsx │ │ │ │ ├── DarkModeActivator │ │ │ │ │ └── DarkModeActivator.tsx │ │ │ │ ├── FormComponents │ │ │ │ │ ├── DaysSelector │ │ │ │ │ │ └── DaysSelector.tsx │ │ │ │ │ └── common │ │ │ │ │ │ └── styleLibrary.ts │ │ │ │ ├── Hooks │ │ │ │ │ └── useApi.tsx │ │ │ │ ├── MainError │ │ │ │ │ └── MainError.tsx │ │ │ │ ├── ModalWrapper │ │ │ │ │ ├── ConfirmDialog.tsx │ │ │ │ │ └── ModalWrapper.tsx │ │ │ │ ├── ObjectManager │ │ │ │ │ ├── ObjectHandled.tsx │ │ │ │ │ ├── ObjectManager.tsx │ │ │ │ │ ├── ObjectManagerButton.tsx │ │ │ │ │ └── TrafficMonitor.tsx │ │ │ │ ├── PageHeaderWrapper │ │ │ │ │ └── PageHeaderWrapper.tsx │ │ │ │ ├── ProgressBarWrapper │ │ │ │ │ └── ProgressBarWrapper.tsx │ │ │ │ ├── SearchBox.tsx │ │ │ │ ├── TooltipWrapper │ │ │ │ │ └── TooltipWrapper.tsx │ │ │ │ └── VirtualizedList │ │ │ │ │ └── VirtualizedList.tsx │ │ │ ├── Console.tsx │ │ │ ├── ConsoleKBar.tsx │ │ │ ├── HelpItem.tsx │ │ │ ├── HelpMenu.tsx │ │ │ ├── HelpMenu.types.ts │ │ │ ├── License │ │ │ │ ├── CheckIcon.tsx │ │ │ │ ├── License.tsx │ │ │ │ ├── LicenseConsentModal.tsx │ │ │ │ ├── LicenseFAQ.tsx │ │ │ │ ├── LicenseLink.tsx │ │ │ │ ├── LicensePlans.tsx │ │ │ │ ├── licenseSlice.ts │ │ │ │ ├── types.tsx │ │ │ │ └── utils.tsx │ │ │ ├── Menu │ │ │ │ ├── Listing │ │ │ │ │ ├── BucketFiltering.tsx │ │ │ │ │ ├── BucketListItem.tsx │ │ │ │ │ └── BucketsListing.tsx │ │ │ │ ├── MenuWrapper.tsx │ │ │ │ └── types.ts │ │ │ ├── ObjectBrowser │ │ │ │ ├── BrowserBreadcrumbs.tsx │ │ │ │ ├── FilterObjectsSB.tsx │ │ │ │ ├── OBBrowserMain.tsx │ │ │ │ ├── OBHeader.tsx │ │ │ │ ├── ObjectBrowser.tsx │ │ │ │ ├── RenameLongFilename.tsx │ │ │ │ ├── objectBrowserSlice.ts │ │ │ │ ├── objectBrowserThunks.ts │ │ │ │ ├── transferManager.ts │ │ │ │ ├── types.ts │ │ │ │ └── utils.ts │ │ │ ├── consoleSlice.ts │ │ │ ├── consoleSlice.types.ts │ │ │ ├── helpTopics.json │ │ │ └── kbar-actions.tsx │ │ ├── LoginPage │ │ │ ├── Login.tsx │ │ │ ├── StrategyForm.tsx │ │ │ ├── login.types.ts │ │ │ ├── login.utils.ts │ │ │ ├── loginSlice.ts │ │ │ ├── loginThunks.ts │ │ │ └── sessionThunk.ts │ │ ├── LogoutPage │ │ │ └── LogoutPage.tsx │ │ └── NotFoundPage.tsx │ ├── store.ts │ ├── systemSlice.ts │ ├── types.ts │ ├── utils │ │ ├── matchMedia.js │ │ ├── stylesUtils.ts │ │ ├── validationFunctions.ts │ │ └── wsUtils.ts │ └── websockets │ │ └── objectBrowserWSMiddleware.ts ├── tests-examples │ └── demo-todo-app.spec.ts ├── tests │ ├── constants │ │ └── timestamp.txt │ ├── permissions-1 │ │ └── test-fix-ui-crash-for-policy.ts │ ├── permissions-2 │ │ ├── bucketWrite.ts │ │ └── deleteObjectWithPrefixOnly.ts │ ├── permissions-3 │ │ ├── bucketDeleteAllVersions.ts │ │ ├── bucketObjectTags.ts │ │ ├── bucketRead.ts │ │ └── bucketSpecific.ts │ ├── permissions-4 │ │ ├── deleteWithPrefixes.ts │ │ ├── errorsVisibleOB.ts │ │ ├── filePreview.ts │ │ ├── resourceTesting.ts │ │ └── sameBucketPath.ts │ ├── permissions-6 │ │ └── rewind.ts │ ├── permissions-B │ │ └── bucketWritePrefixOnly.ts │ ├── policies │ │ ├── bucketAssignPolicy.json │ │ ├── bucketCannotTag.json │ │ ├── bucketRead.json │ │ ├── bucketReadWrite.json │ │ ├── bucketSpecific.json │ │ ├── bucketWrite.json │ │ ├── bucketWritePrefixOnlyPolicy.json │ │ ├── conditionsPolicy.json │ │ ├── conditionsPolicy2.json │ │ ├── conditionsPolicy3.json │ │ ├── conditionsPolicy4.json │ │ ├── dashboard.json │ │ ├── deleteObjectWithPrefix.json │ │ ├── diagnostics.json │ │ ├── fix-prefix-policy-ui-crash.json │ │ ├── groups.json │ │ ├── iamPolicies.json │ │ ├── inspect-allowed.json │ │ ├── inspect-not-allowed.json │ │ ├── logs.json │ │ ├── notificationEndpoints.json │ │ ├── rewind-allowed.json │ │ ├── rewind-not-allowed.json │ │ ├── settings.json │ │ ├── tiers.json │ │ ├── trace.json │ │ ├── users.json │ │ └── watch.json │ ├── scripts │ │ ├── cleanup-env.sh │ │ ├── common.sh │ │ ├── initialize-env.sh │ │ ├── operator.sh │ │ ├── permissions.sh │ │ ├── resources │ │ │ └── kustomization.yaml │ │ ├── tenant-kes-encryption │ │ │ └── kustomization.yaml │ │ └── tenant-lite │ │ │ └── kustomization.yaml │ ├── subpath-nginx │ │ ├── nginx.conf │ │ └── test-unauthenticated-user.ts │ ├── uploads │ │ ├── file1.pdf │ │ ├── filescript.pdf │ │ ├── internode.png │ │ ├── noextension │ │ └── test.txt │ └── utils │ │ ├── constants.ts │ │ ├── elements-menu.ts │ │ ├── elements.ts │ │ ├── functions.ts │ │ └── roles.ts ├── tsconfig.dev.json ├── tsconfig.json └── yarn.lock └── yarn.lock /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: community, triage 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## NOTE 11 | 12 | Please subscribe to our [paid subscription plans](https://min.io/pricing) for 24x7 support from our Engineering team. 13 | 14 | 15 | 16 | ## Expected Behavior 17 | 18 | 19 | 20 | ## Current Behavior 21 | 22 | 23 | 24 | ## Possible Solution 25 | 26 | 27 | 28 | ## Steps to Reproduce (for bugs) 29 | 30 | 31 | 32 | 1. 33 | 2. 34 | 3. 35 | 4. 36 | 37 | ## Context 38 | 39 | 40 | 41 | ## Regression 42 | 43 | 44 | 45 | ## Your Environment 46 | 47 | * MinIO version used (`minio --version`): 48 | * Server setup and configuration: 49 | * Operating System and version (`uname -a`): 50 | -------------------------------------------------------------------------------- /.github/workflows/issues.yaml: -------------------------------------------------------------------------------- 1 | # @format 2 | 3 | name: Issue Workflow 4 | 5 | on: 6 | issues: 7 | types: 8 | - opened 9 | 10 | jobs: 11 | add-to-project: 12 | name: Add issue to project 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/add-to-project@v0.5.0 16 | with: 17 | project-url: https://github.com/orgs/miniohq/projects/2 18 | github-token: ${{ secrets.BOT_PAT }} 19 | -------------------------------------------------------------------------------- /.github/workflows/vulncheck.yaml: -------------------------------------------------------------------------------- 1 | # @format 2 | 3 | name: Vulnerability Check 4 | on: 5 | pull_request: 6 | branches: 7 | - master 8 | 9 | permissions: 10 | contents: read # to fetch code (actions/checkout) 11 | 12 | jobs: 13 | vulncheck: 14 | name: Analysis 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Check out code into the Go module directory 18 | uses: actions/checkout@v4 19 | - name: Set up Go 20 | uses: actions/setup-go@v5 21 | with: 22 | go-version: 1.23.8 23 | check-latest: true 24 | - name: Get official govulncheck 25 | run: go install golang.org/x/vuln/cmd/govulncheck@latest 26 | shell: bash 27 | - name: Run govulncheck 28 | run: govulncheck ./... 29 | shell: bash 30 | 31 | react-code-known-vulnerabilities: 32 | name: "React Code Has No Known Vulnerable Deps" 33 | runs-on: ubuntu-latest 34 | strategy: 35 | matrix: 36 | go-version: [ 1.23.x ] 37 | os: [ ubuntu-latest ] 38 | steps: 39 | - name: Check out code 40 | uses: actions/checkout@v4 41 | - name: Read .nvmrc 42 | id: node_version 43 | run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV 44 | - name: Enable Corepack 45 | run: corepack enable 46 | - uses: actions/setup-node@v4 47 | with: 48 | node-version: ${{ env.NVMRC }} 49 | - name: Checks for known security issues with the installed packages 50 | working-directory: ./web-app 51 | continue-on-error: false 52 | run: | 53 | yarn npm audit --recursive --environment production --no-deprecations 54 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Playwright Data 2 | web-app/storage/ 3 | web-app/playwright/.auth/admin.json 4 | 5 | # Report from Playwright 6 | web-app/playwright-report/ 7 | 8 | # Coverage from Playwright 9 | web-app/.nyc_output/ 10 | 11 | # Binaries for programs and plugins 12 | *.exe 13 | *.exe~ 14 | *.dll 15 | *.so 16 | *.dylib 17 | .DS_Store 18 | *.swp 19 | *.orig 20 | 21 | # Test binary, build with `go test -c` 22 | *.test 23 | 24 | .idea/ 25 | vendor/ 26 | 27 | # Output of the go coverage tool, specifically when used with LiteIDE 28 | *.out 29 | 30 | # Ignore executables 31 | target/ 32 | !pkg/logger/target/ 33 | console 34 | !console/ 35 | 36 | dist/ 37 | 38 | # Ignore node_modules 39 | 40 | web-app/node_modules/ 41 | 42 | # Ignore tls cert and key 43 | private.key 44 | public.crt 45 | 46 | # Ignore VsCode files 47 | .vscode/ 48 | *.code-workspace 49 | *~ 50 | .eslintcache 51 | 52 | # Ignore Bin files 53 | bin/ 54 | -------------------------------------------------------------------------------- /.golangci.bck.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | misspell: 3 | locale: US 4 | testifylint: 5 | disable: 6 | - go-require 7 | staticcheck: 8 | checks: 9 | [ 10 | "all", 11 | "-ST1005", 12 | "-ST1000", 13 | "-SA4000", 14 | "-SA9004", 15 | "-SA1019", 16 | "-SA1008", 17 | "-U1000", 18 | "-ST1016", 19 | ] 20 | goheader: 21 | values: 22 | regexp: 23 | copyright-holder: Copyright \(c\) (20\d\d\-20\d\d)|2021|({{year}}) 24 | template-path: .license.tmpl 25 | 26 | linters: 27 | disable-all: true 28 | enable: 29 | - goimports 30 | - misspell 31 | - govet 32 | - revive 33 | - ineffassign 34 | - gosimple 35 | - gomodguard 36 | - gofmt 37 | - unused 38 | - staticcheck 39 | - unconvert 40 | - gocritic 41 | - gofumpt 42 | - durationcheck 43 | 44 | issues: 45 | exclude-use-default: false 46 | exclude: 47 | - should have a package comment 48 | # TODO(y4m4): Remove once all exported ident. have comments! 49 | - comment on exported function 50 | - comment on exported type 51 | - should have comment 52 | - use leading k in Go names 53 | - comment on exported const 54 | exclude-dirs: 55 | - api/operations 56 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | linters: 3 | default: none 4 | enable: 5 | - durationcheck 6 | - gocritic 7 | - gomodguard 8 | - govet 9 | - ineffassign 10 | - misspell 11 | - revive 12 | - staticcheck 13 | - unconvert 14 | - unused 15 | settings: 16 | goheader: 17 | values: 18 | regexp: 19 | copyright-holder: Copyright \(c\) (20\d\d\-20\d\d)|2021|({{year}}) 20 | template-path: .license.tmpl 21 | misspell: 22 | locale: US 23 | staticcheck: 24 | checks: 25 | - all 26 | - -QF1001 27 | - -QF1008 28 | - -QF1010 29 | - -QF1012 30 | - -SA1008 31 | - -SA1019 32 | - -SA4000 33 | - -SA9004 34 | - -ST1000 35 | - -ST1005 36 | - -ST1016 37 | - -ST1019 38 | - -U1000 39 | testifylint: 40 | disable: 41 | - go-require 42 | exclusions: 43 | generated: lax 44 | rules: 45 | - path: (.+)\.go$ 46 | text: should have a package comment 47 | - path: (.+)\.go$ 48 | text: comment on exported function 49 | - path: (.+)\.go$ 50 | text: comment on exported type 51 | - path: (.+)\.go$ 52 | text: should have comment 53 | - path: (.+)\.go$ 54 | text: use leading k in Go names 55 | - path: (.+)\.go$ 56 | text: comment on exported const 57 | paths: 58 | - api/operations 59 | - third_party$ 60 | - builtin$ 61 | - examples$ 62 | formatters: 63 | enable: 64 | - gofmt 65 | - gofumpt 66 | - goimports 67 | exclusions: 68 | generated: lax 69 | paths: 70 | - api/operations 71 | - third_party$ 72 | - builtin$ 73 | - examples$ 74 | -------------------------------------------------------------------------------- /.license.tmpl: -------------------------------------------------------------------------------- 1 | This file is part of MinIO Console Server 2 | {{copyright-holder}} MinIO, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Affero General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Affero General Public License for more details. 13 | 14 | You should have received a copy of the GNU Affero General Public License 15 | along with this program. If not, see . 16 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 18 -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.semgrepignore: -------------------------------------------------------------------------------- 1 | # Ignore git items 2 | .gitignore 3 | .git/ 4 | :include .gitignore 5 | 6 | # Common large paths 7 | node_modules/ 8 | web-app/node_modules/ 9 | build/ 10 | dist/ 11 | .idea/ 12 | vendor/ 13 | .env/ 14 | .venv/ 15 | .tox/ 16 | *.min.js 17 | 18 | # Common test paths 19 | test/ 20 | tests/ 21 | *_test.go 22 | 23 | # Semgrep rules folder 24 | .semgrep 25 | 26 | # Semgrep-action log folder 27 | .semgrep_logs/ 28 | 29 | # Ignore VsCode files 30 | .vscode/ 31 | *.code-workspace 32 | *~ 33 | .eslintcache 34 | 35 | consoleApi.ts -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | This file is part of MinIO Console Server 2 | Copyright (c) 2023 MinIO, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Affero General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Affero General Public License for more details. 13 | 14 | You should have received a copy of the GNU Affero General Public License 15 | along with this program. If not, see . 16 | -------------------------------------------------------------------------------- /VULNERABILITY_REPORT.md: -------------------------------------------------------------------------------- 1 | ## Vulnerability Management Policy 2 | 3 | This document formally describes the process of addressing and managing a 4 | reported vulnerability that has been found in the MinIO Console server code base, 5 | any directly connected ecosystem component or a direct / indirect dependency 6 | of the code base. 7 | 8 | ### Scope 9 | 10 | The vulnerability management policy described in this document covers the 11 | process of investigating, assessing and resolving a vulnerability report 12 | opened by a MinIO Console employee or an external third party. 13 | 14 | Therefore, it lists pre-conditions and actions that should be performed to 15 | resolve and fix a reported vulnerability. 16 | 17 | ### Vulnerability Management Process 18 | 19 | The vulnerability management process requires that the vulnerability report 20 | contains the following information: 21 | 22 | - The project / component that contains the reported vulnerability. 23 | - A description of the vulnerability. In particular, the type of the 24 | reported vulnerability and how it might be exploited. Alternatively, 25 | a well-established vulnerability identifier, e.g. CVE number, can be 26 | used instead. 27 | 28 | Based on the description mentioned above, a MinIO Console engineer or security team 29 | member investigates: 30 | 31 | - Whether the reported vulnerability exists. 32 | - The conditions that are required such that the vulnerability can be exploited. 33 | - The steps required to fix the vulnerability. 34 | 35 | In general, if the vulnerability exists in one of the MinIO Console code bases 36 | itself - not in a code dependency - then MinIO Console will, if possible, fix 37 | the vulnerability or implement reasonable countermeasures such that the 38 | vulnerability cannot be exploited anymore. 39 | -------------------------------------------------------------------------------- /api/admin_client_mock.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package api 18 | 19 | import ( 20 | "context" 21 | 22 | "github.com/minio/madmin-go/v3" 23 | ) 24 | 25 | type AdminClientMock struct { 26 | minioAccountInfoMock func(ctx context.Context) (madmin.AccountInfo, error) 27 | } 28 | 29 | func (ac AdminClientMock) kmsStatus(_ context.Context) (madmin.KMSStatus, error) { 30 | return madmin.KMSStatus{Name: "name", DefaultKeyID: "key", Endpoints: map[string]madmin.ItemState{"localhost": madmin.ItemState("online")}}, nil 31 | } 32 | 33 | func (ac AdminClientMock) AccountInfo(ctx context.Context) (madmin.AccountInfo, error) { 34 | return ac.minioAccountInfoMock(ctx) 35 | } 36 | -------------------------------------------------------------------------------- /api/doc.go: -------------------------------------------------------------------------------- 1 | // Code generated by go-swagger; DO NOT EDIT. 2 | // This file is part of MinIO Console Server 3 | // Copyright (c) 2023 MinIO, Inc. 4 | // 5 | // This program is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Affero General Public License as published by 7 | // the Free Software Foundation, either version 3 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU Affero General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU Affero General Public License 16 | // along with this program. If not, see . 17 | // 18 | 19 | // Package api MinIO Console Server 20 | // 21 | // Schemes: 22 | // http 23 | // ws 24 | // Host: localhost 25 | // BasePath: /api/v1 26 | // Version: 0.1.0 27 | // 28 | // Consumes: 29 | // - application/json 30 | // - multipart/form-data 31 | // 32 | // Produces: 33 | // - application/octet-stream 34 | // - application/json 35 | // 36 | // swagger:meta 37 | package api 38 | -------------------------------------------------------------------------------- /api/tls.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package api 18 | 19 | import ( 20 | "net/http" 21 | ) 22 | 23 | type ConsoleTransport struct { 24 | Transport http.RoundTripper 25 | ClientIP string 26 | } 27 | 28 | func (t *ConsoleTransport) RoundTrip(req *http.Request) (*http.Response, error) { 29 | if t.ClientIP != "" { 30 | // Do not set an empty x-forwarded-for 31 | req.Header.Add(xForwardedFor, t.ClientIP) 32 | } 33 | return t.Transport.RoundTrip(req) 34 | } 35 | 36 | // PrepareSTSClientTransport : 37 | func PrepareSTSClientTransport(clientIP string) *ConsoleTransport { 38 | return &ConsoleTransport{ 39 | Transport: GlobalTransport, 40 | ClientIP: clientIP, 41 | } 42 | } 43 | 44 | // PrepareConsoleHTTPClient returns an http.Client with custom configurations need it by *credentials.STSAssumeRole 45 | // custom configurations include the use of CA certificates 46 | func PrepareConsoleHTTPClient(clientIP string) *http.Client { 47 | // Return http client with default configuration 48 | return &http.Client{ 49 | Transport: PrepareSTSClientTransport(clientIP), 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /api/user_logout_test.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package api 18 | 19 | import "testing" 20 | 21 | // mock function of Get() 22 | func (ac consoleCredentialsMock) Expire() { 23 | // Do nothing 24 | // Implementing this method for the consoleCredentials interface 25 | } 26 | 27 | func TestLogout(_ *testing.T) { 28 | // There's nothing to test right now 29 | } 30 | -------------------------------------------------------------------------------- /cross-compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | # Enable tracing if set. 5 | [ -n "$BASH_XTRACEFD" ] && set -x 6 | 7 | ## All binaries are static make sure to disable CGO. 8 | export CGO_ENABLED=0 9 | 10 | ## List of architectures and OS to test cross compilation. 11 | SUPPORTED_OSARCH_DEFAULTS="linux/ppc64le linux/mips64 linux/arm64 linux/s390x darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64" 12 | SUPPORTED_OSARCH=${1:-$SUPPORTED_OSARCH_DEFAULTS} 13 | 14 | _build() { 15 | local osarch=$1 16 | IFS=/ read -r -a arr <<<"$osarch" 17 | os="${arr[0]}" 18 | arch="${arr[1]}" 19 | package=$(go list -f '{{.ImportPath}}' ./cmd/console) 20 | printf -- "--> %15s:%s\n" "${osarch}" "${package}" 21 | 22 | # go build -trimpath to build the binary. 23 | GOOS=$os GOARCH=$arch GO111MODULE=on go build -trimpath --tags=kqueue --ldflags "-s -w" -o /dev/null ./cmd/console 24 | } 25 | 26 | main() { 27 | echo "Testing builds for OS/Arch: ${SUPPORTED_OSARCH}" 28 | for each_osarch in ${SUPPORTED_OSARCH}; do 29 | _build "${each_osarch}" 30 | done 31 | } 32 | 33 | main "$@" 34 | -------------------------------------------------------------------------------- /docs/ldap/billy.ldif: -------------------------------------------------------------------------------- 1 | # LDIF fragment to create group branch under root 2 | dn: uid=billy,dc=example,dc=org 3 | uid: billy 4 | cn: billy 5 | sn: 3 6 | objectClass: top 7 | objectClass: posixAccount 8 | objectClass: inetOrgPerson 9 | loginShell: /bin/bash 10 | homeDirectory: /home/billy 11 | uidNumber: 14583102 12 | gidNumber: 14564100 13 | userPassword: {SSHA}j3lBh1Seqe4rqF1+NuWmjhvtAni1JC5A 14 | mail: billy@example.org 15 | gecos: Billy User 16 | 17 | # Create base group 18 | dn: ou=groups,dc=example,dc=org 19 | objectclass:organizationalunit 20 | ou: groups 21 | description: generic groups branch 22 | 23 | # create consoleAdmin group (this already exists on minio and have a policy of s3::*) 24 | dn: cn=consoleAdmin,ou=groups,dc=example,dc=org 25 | objectClass: top 26 | objectClass: posixGroup 27 | gidNumber: 678 28 | 29 | # Assing group to new user 30 | dn: cn=consoleAdmin,ou=groups,dc=example,dc=org 31 | changetype: modify 32 | add: memberuid 33 | memberuid: billy 34 | 35 | 36 | -------------------------------------------------------------------------------- /generator.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | hooks: { 3 | onInsertPathParam: (paramName) => `encodeURIComponent(${paramName})`, 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /hack/header.go.txt: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | -------------------------------------------------------------------------------- /hack/update-codegen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/.. 8 | 9 | GO111MODULE=off go get -d k8s.io/code-generator/... 10 | 11 | REPOSITORY=github.com/minio/console 12 | $GOPATH/src/k8s.io/code-generator/generate-groups.sh all \ 13 | $REPOSITORY/pkg/clientgen $REPOSITORY/pkg/apis networking.gke.io:v1beta2 \ 14 | --go-header-file $SCRIPT_ROOT/hack/header.go.txt 15 | -------------------------------------------------------------------------------- /images/pic1-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/images/pic1-a.png -------------------------------------------------------------------------------- /images/pic1-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/images/pic1-b.png -------------------------------------------------------------------------------- /images/pic2-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/images/pic2-a.png -------------------------------------------------------------------------------- /images/pic2-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/images/pic2-b.png -------------------------------------------------------------------------------- /images/pic3-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/images/pic3-a.png -------------------------------------------------------------------------------- /images/pic3-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/images/pic3-b.png -------------------------------------------------------------------------------- /pkg/auth/idp/oauth2/const.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package oauth2 18 | 19 | // Environment constants for console IDP/SSO configuration 20 | const ( 21 | ConsoleMinIOServer = "CONSOLE_MINIO_SERVER" 22 | ) 23 | -------------------------------------------------------------------------------- /pkg/auth/ldap.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package auth 18 | 19 | // GetCredentialsFromLDAP authenticates the user against MinIO when the LDAP integration is enabled 20 | // if the authentication succeed *credentials.Login object is returned and we continue with the normal STSAssumeRole flow 21 | -------------------------------------------------------------------------------- /pkg/auth/token/config.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package token 18 | 19 | import ( 20 | "time" 21 | 22 | "github.com/minio/console/pkg/auth/utils" 23 | "github.com/minio/pkg/v3/env" 24 | ) 25 | 26 | // GetConsoleSTSDuration returns the default session duration for the STS requested tokens (defaults to 12h) 27 | func GetConsoleSTSDuration() time.Duration { 28 | duration, err := time.ParseDuration(env.Get(ConsoleSTSDuration, "12h")) 29 | if err != nil || duration <= 0 { 30 | duration = 12 * time.Hour 31 | } 32 | return duration 33 | } 34 | 35 | var defaultPBKDFPassphrase = utils.RandomCharString(64) 36 | 37 | // GetPBKDFPassphrase returns passphrase for the pbkdf2 function used to encrypt JWT payload 38 | func GetPBKDFPassphrase() string { 39 | return env.Get(ConsolePBKDFPassphrase, defaultPBKDFPassphrase) 40 | } 41 | 42 | var defaultPBKDFSalt = utils.RandomCharString(64) 43 | 44 | // GetPBKDFSalt returns salt for the pbkdf2 function used to encrypt JWT payload 45 | func GetPBKDFSalt() string { 46 | return env.Get(ConsolePBKDFSalt, defaultPBKDFSalt) 47 | } 48 | -------------------------------------------------------------------------------- /pkg/auth/token/const.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package token 18 | 19 | const ( 20 | ConsoleSTSDuration = "CONSOLE_STS_DURATION" // time.Duration format, ie: 3600s, 2h45m, 1h, etc 21 | ConsolePBKDFPassphrase = "CONSOLE_PBKDF_PASSPHRASE" 22 | ConsolePBKDFSalt = "CONSOLE_PBKDF_SALT" 23 | ) 24 | -------------------------------------------------------------------------------- /pkg/auth/utils/utils_test.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package utils 18 | 19 | import ( 20 | "crypto/sha1" 21 | "testing" 22 | 23 | "github.com/stretchr/testify/assert" 24 | "golang.org/x/crypto/pbkdf2" 25 | ) 26 | 27 | func TestRandomCharString(t *testing.T) { 28 | funcAssert := assert.New(t) 29 | // Test-1 : RandomCharString() should return string with expected length 30 | length := 32 31 | token := RandomCharString(length) 32 | funcAssert.Equal(length, len(token)) 33 | // Test-2 : RandomCharString() should output random string, new generated string should not be equal to the previous one 34 | newToken := RandomCharString(length) 35 | funcAssert.NotEqual(token, newToken) 36 | } 37 | 38 | func TestComputeHmac256(t *testing.T) { 39 | funcAssert := assert.New(t) 40 | // Test-1 : ComputeHmac256() should return the right Hmac256 string based on a derived key 41 | derivedKey := pbkdf2.Key([]byte("secret"), []byte("salt"), 4096, 32, sha1.New) 42 | message := "hello world" 43 | expectedHmac := "5r32q7W+0hcBnqzQwJJUDzVGoVivXGSodTcHSqG/9Q8=" 44 | hmac := ComputeHmac256(message, derivedKey) 45 | funcAssert.Equal(hmac, expectedHmac) 46 | } 47 | -------------------------------------------------------------------------------- /pkg/build-constants.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package pkg 18 | 19 | var ( 20 | // Version - the version being released (v prefix stripped) 21 | Version = "(dev)" 22 | // ReleaseTag - the current git tag 23 | ReleaseTag = "(no tag)" 24 | // ReleaseTime - current UTC date in RFC3339 format. 25 | ReleaseTime = "(no release)" 26 | // CommitID - latest commit id. 27 | CommitID = "(dev)" 28 | // ShortCommitID - first 12 characters from CommitID. 29 | ShortCommitID = "(dev)" 30 | MPSecret = "(dev)" 31 | ) 32 | -------------------------------------------------------------------------------- /pkg/certs/const.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package certs 18 | 19 | const ( 20 | // Default minio configuration directory where below configuration files/directories are stored. 21 | DefaultConsoleConfigDir = ".console" 22 | 23 | // Directory contains below files/directories for HTTPS configuration. 24 | CertsDir = "certs" 25 | 26 | // Directory contains all CA certificates other than system defaults for HTTPS. 27 | CertsCADir = "CAs" 28 | 29 | // Public certificate file for HTTPS. 30 | PublicCertFile = "public.crt" 31 | 32 | // Private key file for HTTPS. 33 | PrivateKeyFile = "private.key" 34 | ) 35 | -------------------------------------------------------------------------------- /pkg/http/headers.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package http 18 | 19 | // Standard S3 HTTP response constants 20 | const ( 21 | ETag = "ETag" 22 | ContentType = "Content-Type" 23 | ) 24 | -------------------------------------------------------------------------------- /pkg/logger/color/color.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package color 18 | 19 | import ( 20 | "fmt" 21 | 22 | "github.com/fatih/color" 23 | ) 24 | 25 | // global colors. 26 | var ( 27 | // Check if we stderr, stdout are dumb terminals, we do not apply 28 | // ansi coloring on dumb terminals. 29 | IsTerminal = func() bool { 30 | return !color.NoColor 31 | } 32 | 33 | Bold = func() func(a ...interface{}) string { 34 | if IsTerminal() { 35 | return color.New(color.Bold).SprintFunc() 36 | } 37 | return fmt.Sprint 38 | }() 39 | 40 | FgRed = func() func(a ...interface{}) string { 41 | if IsTerminal() { 42 | return color.New(color.FgRed).SprintFunc() 43 | } 44 | return fmt.Sprint 45 | }() 46 | 47 | BgRed = func() func(format string, a ...interface{}) string { 48 | if IsTerminal() { 49 | return color.New(color.BgRed).SprintfFunc() 50 | } 51 | return fmt.Sprintf 52 | }() 53 | 54 | FgWhite = func() func(format string, a ...interface{}) string { 55 | if IsTerminal() { 56 | return color.New(color.FgWhite).SprintfFunc() 57 | } 58 | return fmt.Sprintf 59 | }() 60 | ) 61 | -------------------------------------------------------------------------------- /pkg/logger/config/certs.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package config 18 | 19 | import ( 20 | "errors" 21 | ) 22 | 23 | // EnsureCertAndKey checks if both client certificate and key paths are provided 24 | func EnsureCertAndKey(clientCert, clientKey string) error { 25 | if (clientCert != "" && clientKey == "") || 26 | (clientCert == "" && clientKey != "") { 27 | return errors.New("cert and key must be specified as a pair") 28 | } 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /pkg/logger/config/config.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package config 18 | 19 | import ( 20 | "github.com/minio/madmin-go/v3" 21 | ) 22 | 23 | // Default keys 24 | const ( 25 | Default = madmin.Default 26 | ) 27 | 28 | // Top level config constants. 29 | const ( 30 | LoggerWebhookSubSys = "logger_webhook" 31 | AuditWebhookSubSys = "audit_webhook" 32 | ) 33 | -------------------------------------------------------------------------------- /pkg/logger/target/types/types.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package types 18 | 19 | // TargetType indicates type of the target e.g. console, http, kafka 20 | type TargetType uint8 21 | 22 | // Constants for target types 23 | const ( 24 | _ TargetType = iota 25 | TargetConsole 26 | TargetHTTP 27 | ) 28 | -------------------------------------------------------------------------------- /pkg/logger/utils.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package logger 18 | 19 | import ( 20 | "fmt" 21 | "regexp" 22 | "runtime" 23 | 24 | "github.com/minio/console/pkg/logger/color" 25 | ) 26 | 27 | var ansiRE = regexp.MustCompile("(\x1b[^m]*m)") 28 | 29 | // Print ANSI Control escape 30 | func ansiEscape(format string, args ...interface{}) { 31 | Esc := "\x1b" 32 | fmt.Printf("%s%s", Esc, fmt.Sprintf(format, args...)) 33 | } 34 | 35 | func ansiMoveRight(n int) { 36 | if runtime.GOOS == "windows" { 37 | return 38 | } 39 | if color.IsTerminal() { 40 | ansiEscape("[%dC", n) 41 | } 42 | } 43 | 44 | func ansiSaveAttributes() { 45 | if runtime.GOOS == "windows" { 46 | return 47 | } 48 | if color.IsTerminal() { 49 | ansiEscape("7") 50 | } 51 | } 52 | 53 | func ansiRestoreAttributes() { 54 | if runtime.GOOS == "windows" { 55 | return 56 | } 57 | if color.IsTerminal() { 58 | ansiEscape("8") 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /pkg/utils/utils.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package utils 18 | 19 | import ( 20 | "context" 21 | ) 22 | 23 | // Key used for Get/SetReqInfo 24 | type key string 25 | 26 | const ( 27 | ContextLogKey = key("console-log") 28 | ContextRequestID = key("request-id") 29 | ContextRequestUserID = key("request-user-id") 30 | ContextRequestUserAgent = key("request-user-agent") 31 | ContextRequestHost = key("request-host") 32 | ContextRequestRemoteAddr = key("request-remote-addr") 33 | ContextAuditKey = key("request-audit-entry") 34 | ContextClientIP = key("client-ip") 35 | ) 36 | 37 | // ClientIPFromContext attempts to get the Client IP from a context, if it's not present, it returns 38 | // 127.0.0.1 39 | func ClientIPFromContext(ctx context.Context) string { 40 | val := ctx.Value(ContextClientIP) 41 | if val != nil { 42 | return val.(string) 43 | } 44 | return "127.0.0.1" 45 | } 46 | -------------------------------------------------------------------------------- /policies/mcsTestUserAddOnly.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "consoleTestUserAddOnly", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:CreateUser"], 6 | "Effect": "Allow", 7 | "Resource": ["arn:aws:s3:::*"] 8 | } 9 | ], 10 | "version": "2012-10-17" 11 | } 12 | -------------------------------------------------------------------------------- /systemd/README.md: -------------------------------------------------------------------------------- 1 | # Systemd service for MinIO Console 2 | 3 | Systemd script for MinIO Console. 4 | 5 | ## Installation 6 | 7 | - Systemd script is configured to run the binary from /usr/local/bin/. 8 | - Systemd script is configured to run the binary as `console-user`, make sure you create this user prior using service script. 9 | - Download the binary. Find the relevant links for the binary https://github.com/minio/console#binary-releases. 10 | 11 | ## Create the Environment configuration file 12 | 13 | This file serves as input to MinIO Console systemd service. 14 | 15 | ```sh 16 | $ cat <> /etc/default/minio-console 17 | # Special opts 18 | CONSOLE_OPTS="--port 8443" 19 | 20 | # salt to encrypt JWT payload 21 | CONSOLE_PBKDF_PASSPHRASE=CHANGEME 22 | 23 | # required to encrypt JWT payload 24 | CONSOLE_PBKDF_SALT=CHANGEME 25 | 26 | # MinIO Endpoint 27 | CONSOLE_MINIO_SERVER=http://minio.endpoint:9000 28 | 29 | EOT 30 | ``` 31 | 32 | ## Systemctl 33 | 34 | Download `minio-console.service` in `/etc/systemd/system/` 35 | 36 | ``` 37 | ( cd /etc/systemd/system/; curl -O https://raw.githubusercontent.com/minio/console/master/systemd/minio-console.service ) 38 | ``` 39 | 40 | Enable startup on boot 41 | 42 | ``` 43 | systemctl enable minio-console.service 44 | ``` 45 | 46 | ## Note 47 | 48 | - Replace ``User=console-user`` and ``Group=console-user`` in minio-console.service file with your local setup. 49 | - Ensure that ``CONSOLE_PBKDF_PASSPHRASE`` and ``CONSOLE_PBKDF_SALT`` are set to appropriate values. 50 | - Ensure that ``CONSOLE_MINIO_SERVER`` is set to appropriate server endpoint. 51 | -------------------------------------------------------------------------------- /systemd/console.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=MinIO Console 3 | Documentation=https://min.io/docs/minio/linux/index.html 4 | Wants=network-online.target 5 | After=network-online.target 6 | AssertFileIsExecutable=/usr/local/bin/console 7 | 8 | [Service] 9 | WorkingDirectory=/usr/local/ 10 | 11 | User=console-user 12 | Group=console-user 13 | 14 | EnvironmentFile=/etc/default/minio-console 15 | 16 | ExecStart=/usr/local/bin/console server $CONSOLE_OPTS 17 | 18 | # Let systemd restart this service always 19 | Restart=always 20 | StartLimitBurst=2 21 | StartLimitInterval=5 22 | 23 | # Specifies the maximum file descriptor number that can be opened by this process 24 | LimitNOFILE=65536 25 | 26 | # Disable timeout logic and wait until process is stopped 27 | TimeoutStopSec=infinity 28 | SendSIGKILL=no 29 | 30 | [Install] 31 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /verify-gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Expanding gofmt to cover more areas. 4 | # This will include auto generated files created by Swagger. 5 | # Catching the difference due to https://github.com/golang/go/issues/46289 6 | DIFF=$(GO111MODULE=on gofmt -d .) 7 | if [[ -n $DIFF ]]; 8 | then 9 | echo "$DIFF"; 10 | echo "please run gofmt"; 11 | exit 1; 12 | fi 13 | -------------------------------------------------------------------------------- /web-app/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /web-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules/ 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | 23 | # Yarn (see https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored) 24 | .yarn/* 25 | !.yarn/cache 26 | !.yarn/patches 27 | !.yarn/plugins 28 | !.yarn/releases 29 | !.yarn/sdks 30 | !.yarn/versions 31 | -------------------------------------------------------------------------------- /web-app/.prettierignore: -------------------------------------------------------------------------------- 1 | build 2 | coverage 3 | .nyc_output -------------------------------------------------------------------------------- /web-app/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | checksumBehavior: reset 2 | 3 | nodeLinker: node-modules 4 | -------------------------------------------------------------------------------- /web-app/Makefile: -------------------------------------------------------------------------------- 1 | default: build-static 2 | 3 | build-static: 4 | @echo "Building frontend static assets to 'build'" 5 | @if [ -f "${NVM_DIR}/nvm.sh" ]; then \. "${NVM_DIR}/nvm.sh" && nvm install && nvm use; fi && \ 6 | yarn build 7 | 8 | build-static-istanbul-coverage: 9 | @echo "Building frontend static assets to 'build'" 10 | @if [ -f "${NVM_DIR}/nvm.sh" ]; then \. "${NVM_DIR}/nvm.sh" && nvm install && nvm use; fi && \ 11 | yarn buildistanbulcoverage 12 | 13 | test-warnings: 14 | ./check-warnings.sh 15 | 16 | test-prettier: 17 | ./check-prettier.sh 18 | 19 | find-deadcode: 20 | ./check-deadcode.sh 21 | 22 | prettify: 23 | yarn prettier --write . --log-level warn 24 | 25 | pretty: prettify 26 | -------------------------------------------------------------------------------- /web-app/assets.go: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | package portalui 18 | 19 | import "embed" 20 | 21 | //go:embed build/* 22 | var fs embed.FS 23 | 24 | func GetStaticAssets() embed.FS { 25 | return fs 26 | } 27 | -------------------------------------------------------------------------------- /web-app/build/amazon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/amazon.png -------------------------------------------------------------------------------- /web-app/build/amqp-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/amqp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/amqp.png -------------------------------------------------------------------------------- /web-app/build/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/android-icon-144x144.png -------------------------------------------------------------------------------- /web-app/build/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/android-icon-192x192.png -------------------------------------------------------------------------------- /web-app/build/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/android-icon-36x36.png -------------------------------------------------------------------------------- /web-app/build/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/android-icon-48x48.png -------------------------------------------------------------------------------- /web-app/build/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/android-icon-72x72.png -------------------------------------------------------------------------------- /web-app/build/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/android-icon-96x96.png -------------------------------------------------------------------------------- /web-app/build/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/apple-icon-180x180.png -------------------------------------------------------------------------------- /web-app/build/azure-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/azure.png -------------------------------------------------------------------------------- /web-app/build/elasticsearch-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/elasticsearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/elasticsearch.png -------------------------------------------------------------------------------- /web-app/build/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/favicon-16x16.png -------------------------------------------------------------------------------- /web-app/build/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/favicon-32x32.png -------------------------------------------------------------------------------- /web-app/build/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/favicon-96x96.png -------------------------------------------------------------------------------- /web-app/build/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/favicon.ico -------------------------------------------------------------------------------- /web-app/build/gcs-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/gcs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/gcs.png -------------------------------------------------------------------------------- /web-app/build/images/background.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web-app/build/images/ob_bucket_clear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web-app/build/images/ob_bucket_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web-app/build/images/ob_file_clear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web-app/build/images/ob_file_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web-app/build/images/ob_folder_clear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web-app/build/images/ob_folder_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web-app/build/images/object-browser-icn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web-app/build/images/search-icn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /web-app/build/images/trash-icn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web-app/build/index.html: -------------------------------------------------------------------------------- 1 | MinIO Console
-------------------------------------------------------------------------------- /web-app/build/kafka-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/kafka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/kafka.png -------------------------------------------------------------------------------- /web-app/build/lambda-rect.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/logo192.png -------------------------------------------------------------------------------- /web-app/build/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/logo512.png -------------------------------------------------------------------------------- /web-app/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MinIO Console", 3 | "icons": [ 4 | { 5 | "src": "favicon.ico", 6 | "sizes": "64x64 32x32 24x24 16x16", 7 | "type": "image/x-icon" 8 | }, 9 | { 10 | "src": "logo192.png", 11 | "type": "image/png", 12 | "sizes": "192x192" 13 | }, 14 | { 15 | "src": "logo512.png", 16 | "type": "image/png", 17 | "sizes": "512x512" 18 | }, 19 | { 20 | "src": "android-icon-36x36.png", 21 | "sizes": "36x36", 22 | "type": "image/png", 23 | "density": "0.75" 24 | }, 25 | { 26 | "src": "android-icon-48x48.png", 27 | "sizes": "48x48", 28 | "type": "image/png", 29 | "density": "1.0" 30 | }, 31 | { 32 | "src": "android-icon-72x72.png", 33 | "sizes": "72x72", 34 | "type": "image/png", 35 | "density": "1.5" 36 | }, 37 | { 38 | "src": "android-icon-96x96.png", 39 | "sizes": "96x96", 40 | "type": "image/png", 41 | "density": "2.0" 42 | }, 43 | { 44 | "src": "android-icon-144x144.png", 45 | "sizes": "144x144", 46 | "type": "image/png", 47 | "density": "3.0" 48 | } 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /web-app/build/minio-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/minioTier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/minioTier.png -------------------------------------------------------------------------------- /web-app/build/mqtt-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/mqtt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/mqtt.png -------------------------------------------------------------------------------- /web-app/build/mysql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/mysql.png -------------------------------------------------------------------------------- /web-app/build/nats-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/nats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/nats.png -------------------------------------------------------------------------------- /web-app/build/nsq-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/build/postgres.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/postgres.png -------------------------------------------------------------------------------- /web-app/build/redis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/redis.png -------------------------------------------------------------------------------- /web-app/build/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /web-app/build/static/css/main.e60e4760.css: -------------------------------------------------------------------------------- 1 | .ReactVirtualized__Table__headerRow{font-weight:700;text-transform:uppercase}.ReactVirtualized__Table__headerRow,.ReactVirtualized__Table__row{align-items:center;display:flex;flex-direction:row}.ReactVirtualized__Table__headerTruncatedText{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ReactVirtualized__Table__headerColumn,.ReactVirtualized__Table__rowColumn{margin-right:10px;min-width:0}.ReactVirtualized__Table__rowColumn{text-overflow:ellipsis;white-space:nowrap}.ReactVirtualized__Table__headerColumn:first-of-type,.ReactVirtualized__Table__rowColumn:first-of-type{margin-left:10px}.ReactVirtualized__Table__sortableHeaderColumn{cursor:pointer}.ReactVirtualized__Table__sortableHeaderIconContainer{align-items:center;display:flex}.ReactVirtualized__Table__sortableHeaderIcon{fill:currentColor;flex:0 0 24px;height:1em;width:1em}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.removeArrows input::-webkit-inner-spin-button,.removeArrows input::-webkit-outer-spin-button,input.removeArrows::-webkit-inner-spin-button,input.removeArrows::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.removeArrows input[type=number],input.removeArrows[type=number]{-moz-appearance:textfield} 2 | /*# sourceMappingURL=main.e60e4760.css.map*/ -------------------------------------------------------------------------------- /web-app/build/static/js/704.08d49eab.chunk.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[704],{2704:(e,t,a)=>{a.r(t),a.d(t,{default:()=>w});var n=a(5043),s=a(4241),d=a(9923),l=a(2166),o=a(4141),r=a(3635),i=a(6035),c=a(7403),u=a(579);const w=e=>{let{closeModalAndRefresh:t,open:a,bucketName:w}=e;const b=(0,r.j)(),h=(0,l.d4)((e=>e.objectBrowser.rewind.rewindEnabled)),x=(0,l.d4)((e=>e.objectBrowser.rewind.dateToRewind)),[j,p]=(0,n.useState)(!1),[S,m]=(0,n.useState)(!0),[k,f]=(0,n.useState)(s.c9.fromJSDate(new Date));(0,n.useEffect)((()=>{h&&(m(!0),f(s.c9.fromISO(x||s.c9.now().toISO()||"")))}),[h,x]);return(0,u.jsx)(o.A,{modalOpen:a,onClose:()=>{t()},title:`Rewind - ${w}`,children:(0,u.jsxs)(d.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,u.jsx)(d.e8j,{value:k,onChange:e=>e?f(e):null,id:"rewind-selector",label:"Rewind to",timeFormat:"24h",secondsSelector:!1,disabled:!S}),h&&(0,u.jsx)(d.dOG,{value:"status",id:"status",name:"status",checked:S,onChange:e=>{m(e.target.checked)},label:"Current Status",indicatorLabels:["Enabled","Disabled"]}),(0,u.jsx)(d.xA9,{item:!0,xs:12,sx:c.U.modalButtonBar,children:(0,u.jsx)(d.$nd,{type:"button",variant:"callAction",disabled:j||!k&&S,onClick:()=>{!S&&h?b((0,i.rS)()):(p(!0),b((0,i.v8)({state:!0,bucket:w,dateRewind:k.toISO()}))),b((0,i.Yw)(!0)),t()},id:"rewind-apply-button",label:!S&&h?"Show Current Data":"Show Rewind Data"})}),j&&(0,u.jsx)(d.xA9,{item:!0,xs:12,children:(0,u.jsx)(d.z21,{})})]})})}}}]); 2 | //# sourceMappingURL=704.08d49eab.chunk.js.map -------------------------------------------------------------------------------- /web-app/build/static/js/755.769f8547.chunk.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[755],{755:(e,s,a)=>{a.r(s),a.d(s,{default:()=>n});var l=a(5043),p=a(3216),t=a(9808),c=a(685),h=a(579);const n=()=>(0,h.jsxs)(p.BV,{children:[(0,h.jsx)(p.qh,{element:(0,h.jsx)(p.C5,{to:"/buckets"}),path:"*"}),(0,h.jsx)(p.qh,{element:(0,h.jsx)(l.Suspense,{fallback:(0,h.jsx)(c.A,{}),children:(0,h.jsx)(t.A,{})})})]})}}]); 2 | //# sourceMappingURL=755.769f8547.chunk.js.map -------------------------------------------------------------------------------- /web-app/build/static/js/755.769f8547.chunk.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"static/js/755.769f8547.chunk.js","mappings":"kLAsBA,MAgBA,EAhBgBA,KAEZC,EAAAA,EAAAA,MAACC,EAAAA,GAAM,CAAAC,SAAA,EACLC,EAAAA,EAAAA,KAACC,EAAAA,GAAK,CAACC,SAASF,EAAAA,EAAAA,KAACG,EAAAA,GAAQ,CAACC,GAAI,aAAgBC,KAAK,OAEnDL,EAAAA,EAAAA,KAACC,EAAAA,GAAK,CACJC,SACEF,EAAAA,EAAAA,KAACM,EAAAA,SAAQ,CAACC,UAAUP,EAAAA,EAAAA,KAACQ,EAAAA,EAAgB,IAAIT,UACvCC,EAAAA,EAAAA,KAACS,EAAAA,EAAY,U","sources":["screens/Console/Buckets/Buckets.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Suspense } from \"react\";\nimport { Navigate, Route, Routes } from \"react-router-dom\";\n\nimport NotFoundPage from \"../../NotFoundPage\";\nimport LoadingComponent from \"../../../common/LoadingComponent\";\n\nconst Buckets = () => {\n return (\n \n } path=\"*\" />\n\n }>\n \n \n }\n />\n \n );\n};\n\nexport default Buckets;\n"],"names":["Buckets","_jsxs","Routes","children","_jsx","Route","element","Navigate","to","path","Suspense","fallback","LoadingComponent","NotFoundPage"],"sourceRoot":""} -------------------------------------------------------------------------------- /web-app/build/static/js/805.c3d46c58.chunk.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * @licstart The following is the entire license notice for the 3 | * JavaScript code in this page 4 | * 5 | * Copyright 2024 Mozilla Foundation 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | * @licend The above is the entire license notice for the 20 | * JavaScript code in this page 21 | */ 22 | -------------------------------------------------------------------------------- /web-app/build/static/js/868.84f9ff08.chunk.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * cookie 3 | * Copyright(c) 2012-2014 Roman Shtylman 4 | * Copyright(c) 2015 Douglas Christopher Wilson 5 | * MIT Licensed 6 | */ 7 | -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Black.15ca31c0a2a68f76d2d1.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Black.15ca31c0a2a68f76d2d1.woff2 -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Black.c6938660eec019fefd68.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Black.c6938660eec019fefd68.woff -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-BlackItalic.ca1e738e4f349f27514d.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-BlackItalic.ca1e738e4f349f27514d.woff -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-BlackItalic.cb2a7335650c690077fe.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-BlackItalic.cb2a7335650c690077fe.woff2 -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Bold.93c1301bd9f486c573b3.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Bold.93c1301bd9f486c573b3.woff -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Bold.ec64ea577b0349e055ad.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Bold.ec64ea577b0349e055ad.woff2 -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-BoldItalic.2d26c56a606662486796.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-BoldItalic.2d26c56a606662486796.woff2 -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-BoldItalic.b376885042f6c961a541.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-BoldItalic.b376885042f6c961a541.woff -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Italic.890025e726861dba417f.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Italic.890025e726861dba417f.woff -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Italic.cb10ffd7684cd9836a05.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Italic.cb10ffd7684cd9836a05.woff2 -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Light.2d5198822ab091ce4305.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Light.2d5198822ab091ce4305.woff2 -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Light.994e34451cc19ede31d3.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Light.994e34451cc19ede31d3.woff -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-LightItalic.ef9f65d91d2b0ba9b2e4.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-LightItalic.ef9f65d91d2b0ba9b2e4.woff -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-LightItalic.f86952265d7b0f02c921.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-LightItalic.f86952265d7b0f02c921.woff2 -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Regular.8c206db99195777c6769.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Regular.8c206db99195777c6769.woff -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Regular.c8ba52b05a9ef10f4758.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Regular.c8ba52b05a9ef10f4758.woff2 -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Thin.29b9c616a95a912abf73.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Thin.29b9c616a95a912abf73.woff -------------------------------------------------------------------------------- /web-app/build/static/media/Inter-Thin.fff2a096db014f6239d4.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/Inter-Thin.fff2a096db014f6239d4.woff2 -------------------------------------------------------------------------------- /web-app/build/static/media/loginAnimationPoster.9aa924bfe619e71d5d29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/loginAnimationPoster.9aa924bfe619e71d5d29.png -------------------------------------------------------------------------------- /web-app/build/static/media/placeholderimage.077ea48bd1ef1f4a883f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/placeholderimage.077ea48bd1ef1f4a883f.png -------------------------------------------------------------------------------- /web-app/build/static/media/videoBG.17363418b3c2246a0e27.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/build/static/media/videoBG.17363418b3c2246a0e27.mp4 -------------------------------------------------------------------------------- /web-app/build/styles/root-styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | background-color: #fff; 4 | font-family: "Inter", sans-serif; 5 | -webkit-font-smoothing: antialiased; 6 | -moz-osx-font-smoothing: grayscale; 7 | } 8 | 9 | #preload { 10 | display: none; 11 | } 12 | 13 | #loader-block { 14 | display: flex; 15 | flex-direction: column; 16 | width: 100%; 17 | height: 100vh; 18 | justify-content: center; 19 | align-items: center; 20 | } 21 | -------------------------------------------------------------------------------- /web-app/build/webhooks-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/check-deadcode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -f "$NVM_DIR/nvm.sh" ] 4 | then 5 | \. "$NVM_DIR/nvm.sh"; 6 | nvm use; 7 | fi 8 | yarn find-deadcode 9 | -------------------------------------------------------------------------------- /web-app/check-prettier.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -f "$NVM_DIR/nvm.sh" ] 4 | then 5 | \. "$NVM_DIR/nvm.sh"; 6 | nvm use; 7 | fi 8 | yarn install 9 | yarn prettier --check . 10 | -------------------------------------------------------------------------------- /web-app/check-warnings-istanbul-coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | yell() { echo "$0: $*" >&2; } 4 | 5 | die() { 6 | yell "$*" 7 | cat yarn.log 8 | exit 111 9 | } 10 | 11 | try() { "$@" &> yarn.log || die "cannot $*"; } 12 | 13 | rm -f yarn.log 14 | try yarn buildistanbulcoverage 15 | 16 | if cat yarn.log | grep "Compiled with warnings"; then 17 | echo "There are warnings in the code" 18 | exit 1 19 | fi 20 | -------------------------------------------------------------------------------- /web-app/check-warnings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | yell() { echo "$0: $*" >&2; } 4 | 5 | die() { 6 | yell "$*" 7 | cat yarn.log 8 | exit 111 9 | } 10 | 11 | try() { "$@" &> yarn.log || die "cannot $*"; } 12 | 13 | rm -f yarn.log 14 | try yarn build 15 | 16 | if cat yarn.log | grep "Compiled with warnings"; then 17 | echo "There are warnings in the code" 18 | exit 1 19 | fi 20 | -------------------------------------------------------------------------------- /web-app/config-overrides.js: -------------------------------------------------------------------------------- 1 | const rewireReactHotLoader = require("react-app-rewire-hot-loader"); 2 | 3 | /* config-overrides.js */ 4 | module.exports = function override(config, env) { 5 | if (env === "development") { 6 | config.resolve.alias["react-dom"] = "@hot-loader/react-dom"; 7 | } 8 | config = rewireReactHotLoader(config, env); 9 | return config; 10 | }; 11 | 12 | const { override, addBabelPlugins } = require("customize-cra"); 13 | 14 | console.log("add babel plugin"); 15 | 16 | module.exports = override( 17 | process.env.USE_BABEL_PLUGIN_ISTANBUL && 18 | addBabelPlugins("babel-plugin-istanbul"), 19 | ); 20 | -------------------------------------------------------------------------------- /web-app/e2e/auth.setup.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | import { test as setup } from "@playwright/test"; 17 | import { adminAccessKey, adminSecretKey, minioadminFile } from "./consts"; 18 | import { BUCKET_LIST_PAGE } from "./consts"; 19 | 20 | setup("authenticate as admin", async ({ page }) => { 21 | // Perform authentication steps. Replace these actions with your own. 22 | await page.goto(BUCKET_LIST_PAGE); 23 | await page.getByPlaceholder("Username").click(); 24 | await page.getByPlaceholder("Username").fill(adminAccessKey); 25 | await page.getByPlaceholder("Password").click(); 26 | await page.getByPlaceholder("Password").fill(adminSecretKey); 27 | await page.getByRole("button", { name: "Login" }).click(); 28 | 29 | // we need to give the browser time to store the cookies 30 | await page.waitForTimeout(1000); 31 | // End of authentication steps. 32 | 33 | await page.context().storageState({ path: minioadminFile }); 34 | }); 35 | -------------------------------------------------------------------------------- /web-app/e2e/consts.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export const minioadminFile = "playwright/.auth/admin.json"; 18 | 19 | export const SERVER_ENDPOINT = "http://localhost:9090"; 20 | export const BUCKET_LIST_PAGE = `${SERVER_ENDPOINT}/buckets`; 21 | 22 | export const adminAccessKey = "minioadmin"; 23 | export const adminSecretKey = "minioadmin"; 24 | -------------------------------------------------------------------------------- /web-app/e2e/login.spec.ts: -------------------------------------------------------------------------------- 1 | import { test, expect } from "@playwright/test"; 2 | import { adminAccessKey, adminSecretKey, BUCKET_LIST_PAGE } from "./consts"; 3 | 4 | test("Basic `minioadmin` Login", async ({ page, context }) => { 5 | await page.goto(BUCKET_LIST_PAGE); 6 | await page.getByPlaceholder("Username").click(); 7 | await page.getByPlaceholder("Username").fill(adminAccessKey); 8 | await page.getByPlaceholder("Password").click(); 9 | await page.getByPlaceholder("Password").fill(adminSecretKey); 10 | await page.getByRole("button", { name: "Login" }).click(); 11 | await context.storageState({ path: "storage/minioadmin.json" }); 12 | await expect(page.getByRole("main").getByText("Object Browser")).toBeTruthy(); 13 | }); 14 | -------------------------------------------------------------------------------- /web-app/knip.config.ts: -------------------------------------------------------------------------------- 1 | import type { KnipConfig } from "knip"; 2 | 3 | export default { 4 | entry: ["src/**/{index,main}.{ts,tsx}", "e2e/**/*.ts", "test/**/*.ts"], 5 | project: [ 6 | "src/**/*.{ts,tsx}", 7 | "!src/api/**/*", 8 | "e2e/**/*.{ts,tsx}", 9 | "test/**/*.ts", 10 | ], 11 | rules: { 12 | binaries: "error", 13 | classMembers: "error", 14 | dependencies: "error", 15 | devDependencies: "off", 16 | duplicates: "error", 17 | files: "error", 18 | nsExports: "error", 19 | nsTypes: "error", 20 | unlisted: "error", 21 | unresolved: "error", 22 | types: "error", 23 | exports: "error", 24 | enumMembers: "off", 25 | }, 26 | } satisfies KnipConfig; 27 | -------------------------------------------------------------------------------- /web-app/public/amazon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/amazon.png -------------------------------------------------------------------------------- /web-app/public/amqp-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/amqp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/amqp.png -------------------------------------------------------------------------------- /web-app/public/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/android-icon-144x144.png -------------------------------------------------------------------------------- /web-app/public/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/android-icon-192x192.png -------------------------------------------------------------------------------- /web-app/public/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/android-icon-36x36.png -------------------------------------------------------------------------------- /web-app/public/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/android-icon-48x48.png -------------------------------------------------------------------------------- /web-app/public/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/android-icon-72x72.png -------------------------------------------------------------------------------- /web-app/public/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/android-icon-96x96.png -------------------------------------------------------------------------------- /web-app/public/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/apple-icon-180x180.png -------------------------------------------------------------------------------- /web-app/public/azure-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/azure.png -------------------------------------------------------------------------------- /web-app/public/elasticsearch-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/elasticsearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/elasticsearch.png -------------------------------------------------------------------------------- /web-app/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/favicon-16x16.png -------------------------------------------------------------------------------- /web-app/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/favicon-32x32.png -------------------------------------------------------------------------------- /web-app/public/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/favicon-96x96.png -------------------------------------------------------------------------------- /web-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/favicon.ico -------------------------------------------------------------------------------- /web-app/public/gcs-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/gcs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/gcs.png -------------------------------------------------------------------------------- /web-app/public/images/background.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /web-app/public/images/ob_bucket_clear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web-app/public/images/ob_bucket_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web-app/public/images/ob_file_clear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web-app/public/images/ob_file_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web-app/public/images/ob_folder_clear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web-app/public/images/ob_folder_filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web-app/public/images/object-browser-icn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web-app/public/images/search-icn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /web-app/public/images/trash-icn.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web-app/public/kafka-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/kafka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/kafka.png -------------------------------------------------------------------------------- /web-app/public/lambda-rect.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/logo192.png -------------------------------------------------------------------------------- /web-app/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/logo512.png -------------------------------------------------------------------------------- /web-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MinIO Console", 3 | "icons": [ 4 | { 5 | "src": "favicon.ico", 6 | "sizes": "64x64 32x32 24x24 16x16", 7 | "type": "image/x-icon" 8 | }, 9 | { 10 | "src": "logo192.png", 11 | "type": "image/png", 12 | "sizes": "192x192" 13 | }, 14 | { 15 | "src": "logo512.png", 16 | "type": "image/png", 17 | "sizes": "512x512" 18 | }, 19 | { 20 | "src": "android-icon-36x36.png", 21 | "sizes": "36x36", 22 | "type": "image/png", 23 | "density": "0.75" 24 | }, 25 | { 26 | "src": "android-icon-48x48.png", 27 | "sizes": "48x48", 28 | "type": "image/png", 29 | "density": "1.0" 30 | }, 31 | { 32 | "src": "android-icon-72x72.png", 33 | "sizes": "72x72", 34 | "type": "image/png", 35 | "density": "1.5" 36 | }, 37 | { 38 | "src": "android-icon-96x96.png", 39 | "sizes": "96x96", 40 | "type": "image/png", 41 | "density": "2.0" 42 | }, 43 | { 44 | "src": "android-icon-144x144.png", 45 | "sizes": "144x144", 46 | "type": "image/png", 47 | "density": "3.0" 48 | } 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /web-app/public/minio-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/minioTier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/minioTier.png -------------------------------------------------------------------------------- /web-app/public/mqtt-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/mqtt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/mqtt.png -------------------------------------------------------------------------------- /web-app/public/mysql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/mysql.png -------------------------------------------------------------------------------- /web-app/public/nats-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/nats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/nats.png -------------------------------------------------------------------------------- /web-app/public/nsq-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/public/postgres.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/postgres.png -------------------------------------------------------------------------------- /web-app/public/redis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/public/redis.png -------------------------------------------------------------------------------- /web-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /web-app/public/styles/root-styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | background-color: #fff; 4 | font-family: "Inter", sans-serif; 5 | -webkit-font-smoothing: antialiased; 6 | -moz-osx-font-smoothing: grayscale; 7 | } 8 | 9 | #preload { 10 | display: none; 11 | } 12 | 13 | #loader-block { 14 | display: flex; 15 | flex-direction: column; 16 | width: 100%; 17 | height: 100vh; 18 | justify-content: center; 19 | align-items: center; 20 | } 21 | -------------------------------------------------------------------------------- /web-app/public/webhooks-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-app/src/StyleHandler.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React, { Fragment } from "react"; 18 | import { GlobalStyles, ThemeHandler } from "mds"; 19 | import "react-virtualized/styles.css"; 20 | 21 | import { generateOverrideTheme } from "./utils/stylesUtils"; 22 | import "./index.css"; 23 | import { useSelector } from "react-redux"; 24 | import { AppState } from "./store"; 25 | 26 | interface IStyleHandler { 27 | children: React.ReactNode; 28 | } 29 | 30 | const StyleHandler = ({ children }: IStyleHandler) => { 31 | const colorVariants = useSelector( 32 | (state: AppState) => state.system.overrideStyles, 33 | ); 34 | const darkMode = useSelector((state: AppState) => state.system.darkMode); 35 | 36 | let thm = undefined; 37 | 38 | if (colorVariants) { 39 | thm = generateOverrideTheme(colorVariants); 40 | } 41 | 42 | return ( 43 | 44 | 45 | 46 | {children} 47 | 48 | 49 | ); 50 | }; 51 | 52 | export default StyleHandler; 53 | -------------------------------------------------------------------------------- /web-app/src/api/errors.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import { ErrorResponseHandler } from "../common/types"; 18 | import { ApiError } from "./consoleApi"; 19 | 20 | // errorToHandler translates a swagger error to a ErrorResponseHandler which 21 | // is legacy, when all API calls are using the swagger API, we can remove this. 22 | export const errorToHandler = (e: ApiError): ErrorResponseHandler => { 23 | if (!e) { 24 | return { 25 | errorMessage: "", 26 | detailedError: "", 27 | }; 28 | } 29 | return { 30 | errorMessage: e.message || "", 31 | detailedError: e.detailedMessage || "", 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /web-app/src/api/index.ts: -------------------------------------------------------------------------------- 1 | import { Api, HttpResponse, FullRequestParams, ApiError } from "./consoleApi"; 2 | 3 | export let api = new Api(); 4 | api.baseUrl = `${new URL(document.baseURI).pathname}api/v1`; 5 | const internalRequestFunc = api.request; 6 | api.request = async ({ 7 | body, 8 | secure, 9 | path, 10 | type, 11 | query, 12 | format, 13 | baseUrl, 14 | cancelToken, 15 | ...params 16 | }: FullRequestParams): Promise> => { 17 | const internalResp = internalRequestFunc({ 18 | body, 19 | secure, 20 | path, 21 | type, 22 | query, 23 | format, 24 | baseUrl, 25 | cancelToken, 26 | ...params, 27 | }); 28 | return internalResp.then((e) => CommonAPIValidation(e)); 29 | }; 30 | 31 | export function CommonAPIValidation( 32 | res: HttpResponse, 33 | ): HttpResponse { 34 | const err = res.error as ApiError; 35 | if (err && res.status === 403 && err.message === "invalid session") { 36 | if (window.location.pathname !== "/login") { 37 | document.location = "/login"; 38 | } 39 | } 40 | return res; 41 | } 42 | -------------------------------------------------------------------------------- /web-app/src/common/Copyright.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | import { Box } from "mds"; 19 | 20 | export default function Copyright() { 21 | return ( 22 | 23 | {"Copyright © "} 24 | MinIO {new Date().getFullYear()} 25 | {"."} 26 | 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /web-app/src/common/LoadingComponent.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | import { Loader, Grid } from "mds"; 19 | 20 | const LoadingComponent = () => { 21 | return ( 22 | 32 | 37 | 38 | 39 | 40 | ); 41 | }; 42 | 43 | export default LoadingComponent; 44 | -------------------------------------------------------------------------------- /web-app/src/common/SecureComponent/SecureComponent.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React, { cloneElement } from "react"; 18 | import hasPermission from "./accessControl"; 19 | 20 | interface ISecureComponentProps { 21 | errorProps?: any; 22 | RenderError?: any; 23 | matchAll?: boolean; 24 | children: any; 25 | scopes: string[]; 26 | resource: string | string[]; 27 | containsResource?: boolean; 28 | } 29 | 30 | const SecureComponent = ({ 31 | children, 32 | RenderError = () => <>, 33 | errorProps = null, 34 | matchAll = false, 35 | scopes = [], 36 | resource, 37 | containsResource = false, 38 | }: ISecureComponentProps) => { 39 | const permissionGranted = hasPermission( 40 | resource, 41 | scopes, 42 | matchAll, 43 | containsResource, 44 | ); 45 | if (!permissionGranted && !errorProps) return ; 46 | if (!permissionGranted && errorProps) { 47 | return Array.isArray(children) ? ( 48 | <>{children.map((child) => cloneElement(child, { ...errorProps }))} 49 | ) : ( 50 | cloneElement(children, { ...errorProps }) 51 | ); 52 | } 53 | return <>{children}; 54 | }; 55 | 56 | export default SecureComponent; 57 | -------------------------------------------------------------------------------- /web-app/src/common/SecureComponent/index.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export { default as hasPermission } from "./accessControl"; 18 | export { default as SecureComponent } from "./SecureComponent"; 19 | -------------------------------------------------------------------------------- /web-app/src/history.ts: -------------------------------------------------------------------------------- 1 | // check if we are using base path, if not this always is `/` 2 | const baseLocation = new URL(document.baseURI); 3 | export const baseUrl = baseLocation.pathname; 4 | -------------------------------------------------------------------------------- /web-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: "Inter", sans-serif; 4 | -webkit-font-smoothing: antialiased; 5 | -moz-osx-font-smoothing: grayscale; 6 | } 7 | 8 | code { 9 | font-family: 10 | source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; 11 | } 12 | 13 | /* Chrome, Safari, Edge, Opera */ 14 | input.removeArrows::-webkit-outer-spin-button, 15 | input.removeArrows::-webkit-inner-spin-button, 16 | .removeArrows input::-webkit-outer-spin-button, 17 | .removeArrows input::-webkit-inner-spin-button { 18 | -webkit-appearance: none; 19 | margin: 0; 20 | } 21 | 22 | /* Firefox */ 23 | input.removeArrows[type="number"], 24 | .removeArrows input[type="number"] { 25 | -moz-appearance: textfield; 26 | } 27 | -------------------------------------------------------------------------------- /web-app/src/index.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | import ReactDOM from "react-dom/client"; 19 | import { Provider } from "react-redux"; 20 | import { store } from "./store"; 21 | import MainRouter from "./MainRouter"; 22 | import StyleHandler from "./StyleHandler"; 23 | 24 | const root = ReactDOM.createRoot( 25 | document.getElementById("root") as HTMLElement, 26 | ); 27 | 28 | root.render( 29 | 30 | 31 | 32 | 33 | 34 | 35 | , 36 | ); 37 | -------------------------------------------------------------------------------- /web-app/src/placeholderimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/src/placeholderimage.png -------------------------------------------------------------------------------- /web-app/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Buckets/Buckets.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React, { Suspense } from "react"; 18 | import { Navigate, Route, Routes } from "react-router-dom"; 19 | 20 | import NotFoundPage from "../../NotFoundPage"; 21 | import LoadingComponent from "../../../common/LoadingComponent"; 22 | 23 | const Buckets = () => { 24 | return ( 25 | 26 | } path="*" /> 27 | 28 | }> 31 | 32 | 33 | } 34 | /> 35 | 36 | ); 37 | }; 38 | 39 | export default Buckets; 40 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Buckets/ListBuckets/AddBucket/AddBucketName.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | import { InputBox } from "mds"; 19 | import { useSelector } from "react-redux"; 20 | import { setIsDirty, setName } from "./addBucketsSlice"; 21 | import { AppState, useAppDispatch } from "../../../../../store"; 22 | 23 | const AddBucketName = ({ hasErrors }: { hasErrors: boolean }) => { 24 | const dispatch = useAppDispatch(); 25 | 26 | const bucketName = useSelector((state: AppState) => state.addBucket.name); 27 | return ( 28 | { 33 | dispatch(setIsDirty(true)); 34 | }} 35 | onChange={(event: React.ChangeEvent) => { 36 | dispatch(setName(event.target.value)); 37 | }} 38 | label="Bucket Name" 39 | value={bucketName} 40 | required 41 | /> 42 | ); 43 | }; 44 | 45 | export default AddBucketName; 46 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Buckets/ListBuckets/AddBucket/addBucketThunks.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import { createAsyncThunk } from "@reduxjs/toolkit"; 18 | import { AppState } from "../../../../../store"; 19 | import { api } from "../../../../../api"; 20 | import { MakeBucketRequest } from "../../../../../api/consoleApi"; 21 | 22 | export const addBucketAsync = createAsyncThunk( 23 | "buckets/addBucketAsync", 24 | async (_, { getState, rejectWithValue, dispatch }) => { 25 | const state = getState() as AppState; 26 | 27 | const bucketName = state.addBucket.name; 28 | 29 | let request: MakeBucketRequest = { 30 | name: bucketName, 31 | }; 32 | 33 | try { 34 | return await api.buckets.makeBucket(request); 35 | } catch (err: any) { 36 | return rejectWithValue(err.error); 37 | } 38 | }, 39 | ); 40 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/IconWithLabel.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | // This object contains variables that will be used across form components. 18 | 19 | import React from "react"; 20 | import { Box } from "mds"; 21 | import { replaceUnicodeChar } from "../../../../../../common/utils"; 22 | 23 | interface IIconWithLabel { 24 | icon: React.ReactNode; 25 | strings: string[]; 26 | } 27 | 28 | const IconWithLabel = ({ icon, strings }: IIconWithLabel) => { 29 | return ( 30 | 48 | {icon} 49 | 50 | {replaceUnicodeChar(strings[strings.length - 1])} 51 | 52 | 53 | ); 54 | }; 55 | 56 | export default IconWithLabel; 57 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/SpecificVersionPill.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | 19 | interface ISpecificVersionPillProps { 20 | type: "null" | "current" | "deleted"; 21 | } 22 | 23 | const SpecificVersionPill = ({ type }: ISpecificVersionPillProps) => { 24 | let bgColor = "#000"; 25 | let message = ""; 26 | 27 | switch (type) { 28 | case "null": 29 | bgColor = "#07193E"; 30 | message = "NULL VERSION"; 31 | break; 32 | case "deleted": 33 | bgColor = "#868686"; 34 | message = "DELETED"; 35 | break; 36 | default: 37 | bgColor = "#174551"; 38 | message = "CURRENT VERSION"; 39 | } 40 | 41 | return ( 42 | 55 | {message} 56 | 57 | ); 58 | }; 59 | 60 | export default SpecificVersionPill; 61 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/types.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export interface IFileInfo { 18 | is_latest?: boolean; 19 | last_modified: string; 20 | legal_hold_status?: string; 21 | name: string; 22 | retention_mode?: string; 23 | retention_until_date?: string; 24 | size?: string; 25 | tags?: object; 26 | etag?: string; 27 | version_id: string | null; 28 | is_delete_marker?: boolean; 29 | user_metadata?: object; 30 | } 31 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Buckets/ListBuckets/Objects/Preview/PreviewFileModal.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React, { Fragment } from "react"; 18 | import ModalWrapper from "../../../../Common/ModalWrapper/ModalWrapper"; 19 | import PreviewFileContent from "./PreviewFileContent"; 20 | import { ObjectPreviewIcon } from "mds"; 21 | import { BucketObject } from "../../../../../../api/consoleApi"; 22 | 23 | interface IPreviewFileProps { 24 | open: boolean; 25 | bucketName: string; 26 | actualInfo: BucketObject; 27 | onClosePreview: () => void; 28 | } 29 | 30 | const PreviewFileModal = ({ 31 | open, 32 | bucketName, 33 | actualInfo, 34 | onClosePreview, 35 | }: IPreviewFileProps) => { 36 | return ( 37 | 38 | } 44 | > 45 | 46 | 47 | 48 | ); 49 | }; 50 | 51 | export default PreviewFileModal; 52 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Common/Components/AutoColorIcon.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | import { Grid, ThemedLogo } from "mds"; 19 | import { useSelector } from "react-redux"; 20 | import { AppState } from "../../../../store"; 21 | 22 | interface IAutoColorIcon { 23 | marginRight: number; 24 | marginTop: number; 25 | } 26 | 27 | const AutoColorIcon = ({ marginRight, marginTop }: IAutoColorIcon) => { 28 | let tinycolor = require("tinycolor2"); 29 | 30 | const colorVariants = useSelector( 31 | (state: AppState) => state.system.overrideStyles, 32 | ); 33 | 34 | const isDark = 35 | tinycolor(colorVariants?.backgroundColor || "#fff").getBrightness() <= 128; 36 | 37 | return ( 38 | 48 | 49 | 50 | ); 51 | }; 52 | 53 | export default AutoColorIcon; 54 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Common/Components/withSuspense.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React, { ComponentType, Suspense, SuspenseProps } from "react"; 18 | 19 | function withSuspense

( 20 | WrappedComponent: ComponentType

, 21 | fallback: SuspenseProps["fallback"] = null, 22 | ) { 23 | function ComponentWithSuspense(props: P) { 24 | return ( 25 | 26 | 27 | 28 | ); 29 | } 30 | 31 | return ComponentWithSuspense; 32 | } 33 | 34 | export default withSuspense; 35 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Common/FormComponents/common/styleLibrary.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | // This object contains variables that will be used across form components. 18 | 19 | export const modalStyleUtils: any = { 20 | modalButtonBar: { 21 | marginTop: 15, 22 | display: "flex", 23 | alignItems: "center", 24 | justifyContent: "flex-end", 25 | gap: 10, 26 | }, 27 | modalFormScrollable: { 28 | maxHeight: "calc(100vh - 300px)", 29 | overflowY: "auto", 30 | paddingTop: 10, 31 | }, 32 | }; 33 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Common/Hooks/useApi.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import api from "../../../../common/api"; 3 | import { ErrorResponseHandler } from "../../../../common/types"; 4 | 5 | type NoReturnFunction = (param?: any) => void; 6 | type ApiMethodToInvoke = (method: string, url: string, data?: any) => void; 7 | type IsApiInProgress = boolean; 8 | 9 | const useApi = ( 10 | onSuccess: NoReturnFunction, 11 | onError: NoReturnFunction, 12 | ): [IsApiInProgress, ApiMethodToInvoke] => { 13 | const [isLoading, setIsLoading] = useState(false); 14 | 15 | const callApi = (method: string, url: string, data?: any, headers?: any) => { 16 | setIsLoading(true); 17 | api 18 | .invoke(method, url, data, headers) 19 | .then((res: any) => { 20 | setIsLoading(false); 21 | onSuccess(res); 22 | }) 23 | .catch((err: ErrorResponseHandler) => { 24 | setIsLoading(false); 25 | onError(err); 26 | }); 27 | }; 28 | 29 | return [isLoading, callApi]; 30 | }; 31 | 32 | export default useApi; 33 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Common/PageHeaderWrapper/PageHeaderWrapper.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React, { Fragment } from "react"; 18 | import { PageHeader } from "mds"; 19 | import ObjectManagerButton from "../ObjectManager/ObjectManagerButton"; 20 | import DarkModeActivator from "../DarkModeActivator/DarkModeActivator"; 21 | 22 | interface IPageHeaderWrapper { 23 | label: React.ReactNode; 24 | middleComponent?: React.ReactNode; 25 | actions?: React.ReactNode; 26 | } 27 | 28 | const PageHeaderWrapper = ({ 29 | label, 30 | actions, 31 | middleComponent, 32 | }: IPageHeaderWrapper) => { 33 | return ( 34 | 38 | {actions} 39 | 40 | 41 | 42 | } 43 | middleComponent={middleComponent} 44 | /> 45 | ); 46 | }; 47 | 48 | export default PageHeaderWrapper; 49 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Common/SearchBox.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | import { InputBox, SearchIcon } from "mds"; 19 | import { CSSObject } from "styled-components"; 20 | 21 | type SearchBoxProps = { 22 | placeholder?: string; 23 | value: string; 24 | onChange: (value: string) => void; 25 | overrideClass?: any; 26 | id?: string; 27 | label?: string; 28 | sx?: CSSObject; 29 | }; 30 | 31 | const SearchBox = ({ 32 | placeholder = "", 33 | onChange, 34 | overrideClass, 35 | value, 36 | id = "search-resource", 37 | label = "", 38 | sx, 39 | }: SearchBoxProps) => { 40 | return ( 41 | { 47 | onChange(e.target.value); 48 | }} 49 | value={value} 50 | startIcon={} 51 | sx={sx} 52 | /> 53 | ); 54 | }; 55 | 56 | export default SearchBox; 57 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Common/TooltipWrapper/TooltipWrapper.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React, { cloneElement } from "react"; 18 | import { Tooltip } from "mds"; 19 | 20 | interface ITooltipWrapperProps { 21 | tooltip: string; 22 | children: any; 23 | errorProps?: any; 24 | placement?: "bottom" | "left" | "right" | "top"; 25 | } 26 | 27 | const TooltipWrapper = ({ 28 | tooltip, 29 | children, 30 | errorProps = null, 31 | placement, 32 | }: ITooltipWrapperProps) => { 33 | return ( 34 | 35 | 36 | {errorProps ? cloneElement(children, { ...errorProps }) : children} 37 | 38 | 39 | ); 40 | }; 41 | 42 | export default TooltipWrapper; 43 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/HelpMenu.types.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export interface DocItem { 18 | img?: string; 19 | title: string; 20 | url: string; 21 | body: string; 22 | } 23 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/License/CheckIcon.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2024 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import * as React from "react"; 18 | import { SVGProps } from "react"; 19 | 20 | const CheckIcon = (props: SVGProps) => ( 21 | 28 | 29 | 30 | ); 31 | 32 | export default CheckIcon; 33 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/License/License.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React, { Fragment, useEffect } from "react"; 18 | import { PageLayout } from "mds"; 19 | import LicensePlans from "./LicensePlans"; 20 | import PageHeaderWrapper from "../Common/PageHeaderWrapper/PageHeaderWrapper"; 21 | import { setHelpName } from "../../../systemSlice"; 22 | import { useAppDispatch } from "../../../store"; 23 | 24 | const License = () => { 25 | const dispatch = useAppDispatch(); 26 | useEffect(() => { 27 | dispatch(setHelpName("license")); 28 | // eslint-disable-next-line react-hooks/exhaustive-deps 29 | }, []); 30 | 31 | return ( 32 | 33 | 34 | 35 | 36 | 37 | 38 | ); 39 | }; 40 | 41 | export default License; 42 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/License/LicenseLink.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | 19 | const LicenseLink = () => { 20 | return ( 21 | 22 | GNU AGPL v3 23 | 24 | ); 25 | }; 26 | export default LicenseLink; 27 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/License/licenseSlice.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import { createSlice } from "@reduxjs/toolkit"; 18 | 19 | interface IAddPool { 20 | faqModalOpen: boolean; 21 | } 22 | 23 | const initialState: IAddPool = { 24 | faqModalOpen: false, 25 | }; 26 | 27 | const licenseSlice = createSlice({ 28 | name: "license", 29 | initialState, 30 | reducers: { 31 | openFAQModal: (state) => { 32 | state.faqModalOpen = true; 33 | }, 34 | closeFAQModal: (state) => { 35 | state.faqModalOpen = false; 36 | }, 37 | }, 38 | }); 39 | 40 | export default licenseSlice.reducer; 41 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/License/types.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export interface SubnetInfo { 18 | account_id: number; 19 | email: string; 20 | expires_at: string; 21 | plan: string; 22 | storage_capacity: number; 23 | organization: string; 24 | } 25 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Menu/Listing/BucketListItem.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | import { useNavigate } from "react-router-dom"; 19 | import { BucketsIcon, MenuItem } from "mds"; 20 | import { Bucket } from "../../../../api/consoleApi"; 21 | 22 | interface IBucketListItem { 23 | bucket: Bucket; 24 | } 25 | 26 | const BucketListItem = ({ bucket }: IBucketListItem) => { 27 | const navigate = useNavigate(); 28 | 29 | return ( 30 | } 33 | onClick={() => navigate(`/browser/${bucket.name}`)} 34 | id={`manageBucket-${bucket.name}`} 35 | /> 36 | ); 37 | }; 38 | 39 | export default BucketListItem; 40 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/Menu/types.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export interface IRouteRule { 18 | component: any; 19 | path: string; 20 | forceDisplay?: boolean; 21 | fsHidden?: boolean; 22 | customPermissionFnc?: any; 23 | } 24 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/ObjectBrowser/FilterObjectsSB.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import React from "react"; 18 | import { setSearchObjects } from "./objectBrowserSlice"; 19 | import SearchBox from "../Common/SearchBox"; 20 | import { AppState, useAppDispatch } from "../../../store"; 21 | import { useSelector } from "react-redux"; 22 | 23 | const FilterObjectsSB = () => { 24 | const dispatch = useAppDispatch(); 25 | 26 | const searchObjects = useSelector( 27 | (state: AppState) => state.objectBrowser.searchObjects, 28 | ); 29 | return ( 30 | { 33 | dispatch(setSearchObjects(value)); 34 | }} 35 | value={searchObjects} 36 | /> 37 | ); 38 | }; 39 | export default FilterObjectsSB; 40 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/ObjectBrowser/transferManager.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | let objectCalls: { [key: string]: XMLHttpRequest } = {}; 18 | let formDataElements: { [key: string]: FormData } = {}; 19 | 20 | export const storeCallForObjectWithID = (id: string, call: any) => { 21 | objectCalls[id] = call; 22 | }; 23 | 24 | export const callForObjectID = (id: string): any => { 25 | return objectCalls[id]; 26 | }; 27 | 28 | export const storeFormDataWithID = (id: string, formData: FormData) => { 29 | formDataElements[id] = formData; 30 | }; 31 | 32 | export const formDataFromID = (id: string): FormData => { 33 | return formDataElements[id]; 34 | }; 35 | 36 | export const removeTrace = (id: string) => { 37 | delete objectCalls[id]; 38 | delete formDataElements[id]; 39 | }; 40 | 41 | export const makeid = (length: number) => { 42 | var result = ""; 43 | var characters = 44 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 45 | var charactersLength = characters.length; 46 | for (var i = 0; i < length; i++) { 47 | result += characters.charAt(Math.floor(Math.random() * charactersLength)); 48 | } 49 | return result; 50 | }; 51 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/consoleSlice.types.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export enum SessionCallStates { 18 | Initial = "initial", 19 | Loading = "loading", 20 | Done = "done", 21 | } 22 | -------------------------------------------------------------------------------- /web-app/src/screens/Console/kbar-actions.tsx: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import { Action } from "kbar/lib/types"; 18 | import { BucketsIcon } from "mds"; 19 | import { Bucket } from "../../api/consoleApi"; 20 | 21 | export const routesAsKbarActions = ( 22 | buckets: Bucket[], 23 | navigate: (url: string) => void, 24 | ) => { 25 | const initialActions: Action[] = []; 26 | 27 | if (buckets) { 28 | buckets.map((buck) => [ 29 | initialActions.push({ 30 | id: buck.name, 31 | name: buck.name, 32 | section: "List of Buckets", 33 | perform: () => { 34 | navigate(`/browser/${buck.name}`); 35 | }, 36 | icon: , 37 | }), 38 | ]); 39 | } 40 | 41 | return initialActions; 42 | }; 43 | -------------------------------------------------------------------------------- /web-app/src/screens/LoginPage/login.types.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export enum loginStrategyType { 18 | unknown = "unknown", 19 | form = "form", 20 | redirect = "redirect", 21 | serviceAccount = "service-account", 22 | redirectServiceAccount = "redirect-service-account", 23 | } 24 | -------------------------------------------------------------------------------- /web-app/src/screens/LoginPage/login.utils.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import { RedirectRule } from "api/consoleApi"; 18 | 19 | export const redirectRules = (a: RedirectRule, b: RedirectRule) => { 20 | if (a.displayName && b.displayName) { 21 | if (a.displayName > b.displayName) { 22 | return 1; 23 | } 24 | if (a.displayName < b.displayName) { 25 | return -1; 26 | } 27 | } 28 | return 0; 29 | }; 30 | -------------------------------------------------------------------------------- /web-app/src/types.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | 16 | // along with this program. If not, see . 17 | export interface snackBarMessage { 18 | message: string; 19 | detailedErrorMsg: string; 20 | type: "message" | "error"; 21 | } 22 | 23 | export interface SRInfoStateType { 24 | enabled: boolean; 25 | curSite: boolean; 26 | siteName: string; 27 | } 28 | -------------------------------------------------------------------------------- /web-app/src/utils/matchMedia.js: -------------------------------------------------------------------------------- 1 | Object.defineProperty(window, "matchMedia", { 2 | writable: true, 3 | value: jest.fn().mockImplementation((query) => ({ 4 | matches: false, 5 | media: query, 6 | onchange: null, 7 | addListener: jest.fn(), // Deprecated 8 | removeListener: jest.fn(), // Deprecated 9 | addEventListener: jest.fn(), 10 | removeEventListener: jest.fn(), 11 | dispatchEvent: jest.fn(), 12 | })), 13 | }); 14 | -------------------------------------------------------------------------------- /web-app/src/utils/validationFunctions.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export const isVersionedMode = (status: string | undefined) => { 18 | return status === "Enabled" || status === "Suspended"; 19 | }; 20 | -------------------------------------------------------------------------------- /web-app/src/utils/wsUtils.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2021 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | export const wsProtocol = (protocol: string): string => { 18 | let wsProtocol = "ws"; 19 | if (protocol === "https:") { 20 | wsProtocol = "wss"; 21 | } 22 | return wsProtocol; 23 | }; 24 | -------------------------------------------------------------------------------- /web-app/tests/constants/timestamp.txt: -------------------------------------------------------------------------------- 1 | 1737352766 2 | -------------------------------------------------------------------------------- /web-app/tests/policies/bucketAssignPolicy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": [ 6 | "s3:PutBucketPolicy", 7 | "s3:DeleteBucketPolicy", 8 | "s3:GetBucketPolicy", 9 | "s3:ListBucket" 10 | ], 11 | "Effect": "Allow", 12 | "Resource": ["arn:aws:s3:::*"], 13 | "Sid": "" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /web-app/tests/policies/bucketCannotTag.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Effect": "Allow", 6 | "Action": ["s3:*"], 7 | "Resource": ["arn:aws:s3:::*"] 8 | }, 9 | { 10 | "Action": ["s3:PutObjectTagging", "s3:DeleteObjectTagging"], 11 | "Effect": "Deny", 12 | "Sid": "Deny_Tagging_Actions", 13 | "Resource": ["arn:aws:s3:::*"] 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /web-app/tests/policies/bucketRead.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": [ 6 | "s3:ListMultipartUploadParts", 7 | "s3:ListBucketMultipartUploads", 8 | "s3:ListBucket", 9 | "s3:HeadBucket", 10 | "s3:GetObject", 11 | "s3:GetBucketLocation" 12 | ], 13 | "Effect": "Allow", 14 | "Resource": ["arn:aws:s3:::*"], 15 | "Sid": "" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /web-app/tests/policies/bucketReadWrite.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Effect": "Allow", 6 | "Action": ["s3:*"], 7 | "Resource": ["arn:aws:s3:::*"] 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /web-app/tests/policies/bucketSpecific.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Effect": "Allow", 6 | "Action": ["s3:*"], 7 | "Resource": [ 8 | "arn:aws:s3:::specific-bucket-1/*", 9 | "arn:aws:s3:::specific-bucket-2/*", 10 | "arn:aws:s3:::specific-bucket-3/*", 11 | "arn:aws:s3:::specific-bucket-4/*", 12 | "arn:aws:s3:::specific-bucket-5/*", 13 | "arn:aws:s3:::specific-bucket-6/*", 14 | "arn:aws:s3:::specific-bucket-7/*", 15 | "arn:aws:s3:::specific-bucket-8/*", 16 | "arn:aws:s3:::specific-bucket-9/*", 17 | "arn:aws:s3:::specific-bucket-10/*" 18 | ] 19 | }, 20 | { 21 | "Effect": "Allow", 22 | "Action": ["s3:GetBucketLocation", "s3:ListAllMyBuckets"], 23 | "Resource": ["arn:aws:s3:::specific-bucket-11/*"] 24 | }, 25 | { 26 | "Effect": "Allow", 27 | "Action": ["s3:CreateBucket"], 28 | "Resource": [ 29 | "arn:aws:s3:::specific-bucket-1", 30 | "arn:aws:s3:::specific-bucket-2", 31 | "arn:aws:s3:::specific-bucket-3", 32 | "arn:aws:s3:::specific-bucket-4", 33 | "arn:aws:s3:::specific-bucket-5", 34 | "arn:aws:s3:::specific-bucket-6", 35 | "arn:aws:s3:::specific-bucket-7", 36 | "arn:aws:s3:::specific-bucket-8", 37 | "arn:aws:s3:::specific-bucket-9", 38 | "arn:aws:s3:::specific-bucket-10", 39 | "arn:aws:s3:::specific-bucket-11" 40 | ] 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /web-app/tests/policies/bucketWrite.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": [ 6 | "s3:AbortMultipartUpload", 7 | "s3:CreateBucket", 8 | "s3:PutObject", 9 | "s3:DeleteObject", 10 | "s3:DeleteBucket" 11 | ], 12 | "Effect": "Allow", 13 | "Resource": ["arn:aws:s3:::*"], 14 | "Sid": "" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /web-app/tests/policies/bucketWritePrefixOnlyPolicy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["s3:ListBucket", "s3:GetBucketLocation"], 6 | "Effect": "Allow", 7 | "Resource": ["arn:aws:s3:::testcafe"] 8 | }, 9 | { 10 | "Action": ["s3:ListBucket", "s3:GetObject"], 11 | "Effect": "Allow", 12 | "Resource": ["arn:aws:s3:::testcafe/*"] 13 | }, 14 | { 15 | "Action": [ 16 | "s3:ListBucket", 17 | "s3:GetObject", 18 | "s3:PutObject", 19 | "s3:DeleteObject" 20 | ], 21 | "Effect": "Allow", 22 | "Resource": ["arn:aws:s3:::testcafe/write/*"] 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /web-app/tests/policies/conditionsPolicy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Sid": "read-only", 6 | "Effect": "Allow", 7 | "Action": ["s3:GetBucketLocation"], 8 | "Resource": ["arn:aws:s3:::testcondition"] 9 | }, 10 | { 11 | "Sid": "read", 12 | "Effect": "Allow", 13 | "Action": ["s3:GetObject"], 14 | "Resource": ["arn:aws:s3:::testcondition/firstlevel/*"] 15 | }, 16 | { 17 | "Sid": "statement2", 18 | "Effect": "Allow", 19 | "Action": ["s3:ListBucket"], 20 | "Resource": ["arn:aws:s3:::testcondition"], 21 | "Condition": { 22 | "StringLike": { 23 | "s3:prefix": ["firstlevel/*"] 24 | } 25 | } 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /web-app/tests/policies/conditionsPolicy2.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Sid": "read-only", 6 | "Effect": "Allow", 7 | "Action": ["s3:GetBucketLocation"], 8 | "Resource": ["arn:aws:s3:::testcondition"] 9 | }, 10 | { 11 | "Sid": "read", 12 | "Effect": "Allow", 13 | "Action": ["s3:GetObject"], 14 | "Resource": ["arn:aws:s3:::testcondition/firstlevel/*"] 15 | }, 16 | { 17 | "Sid": "statement2", 18 | "Effect": "Allow", 19 | "Action": ["s3:ListBucket"], 20 | "Resource": ["arn:aws:s3:::testcondition"], 21 | "Condition": { 22 | "StringLike": { 23 | "s3:prefix": ["firstlevel/secondlevel/thirdlevel/*"] 24 | } 25 | } 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /web-app/tests/policies/conditionsPolicy3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Sid": "AllowUserToSeeBucketListInTheConsole", 6 | "Action": ["s3:ListAllMyBuckets", "s3:GetBucketLocation"], 7 | "Effect": "Allow", 8 | "Resource": ["arn:aws:s3:::*"] 9 | }, 10 | { 11 | "Sid": "AllowRootAndHomeListingOfCompanyBucket", 12 | "Action": ["s3:ListBucket"], 13 | "Effect": "Allow", 14 | "Resource": ["arn:aws:s3:::my-company"], 15 | "Condition": { 16 | "StringEquals": { 17 | "s3:prefix": ["", "home/", "home/User"], 18 | "s3:delimiter": ["/"] 19 | } 20 | } 21 | }, 22 | { 23 | "Sid": "AllowListingOfUserFolder", 24 | "Action": ["s3:ListBucket"], 25 | "Effect": "Allow", 26 | "Resource": ["arn:aws:s3:::my-company"], 27 | "Condition": { "StringLike": { "s3:prefix": ["home/User/*"] } } 28 | }, 29 | { 30 | "Sid": "AllowAllS3ActionsInUserFolder", 31 | "Effect": "Allow", 32 | "Action": ["s3:*"], 33 | "Resource": ["arn:aws:s3:::my-company/home/User/*"] 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /web-app/tests/policies/conditionsPolicy4.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Sid": "AllowUserToSeeBucketListInTheConsole", 6 | "Action": [ 7 | "s3:ListAllMyBuckets", 8 | "s3:GetBucketLocation", 9 | "s3:GetBucketVersioning" 10 | ], 11 | "Effect": "Allow", 12 | "Resource": ["arn:aws:s3:::*"] 13 | }, 14 | { 15 | "Sid": "AllowRootAndHomeListingOfCompanyBucket", 16 | "Action": ["s3:ListBucket", "s3:List*"], 17 | "Effect": "Allow", 18 | "Resource": ["arn:aws:s3:::my-company2"], 19 | "Condition": { 20 | "StringEquals": { 21 | "s3:prefix": ["", "home/", "home/User"], 22 | "s3:delimiter": ["/"] 23 | } 24 | } 25 | }, 26 | { 27 | "Sid": "AllowListingOfUserFolder", 28 | "Action": ["s3:ListBucket", "s3:List*"], 29 | "Effect": "Allow", 30 | "Resource": ["arn:aws:s3:::my-company2"], 31 | "Condition": { 32 | "StringLike": { 33 | "s3:prefix": ["home/User/*"] 34 | } 35 | } 36 | }, 37 | { 38 | "Sid": "AllowAllS3ActionsInUserFolder", 39 | "Effect": "Allow", 40 | "Action": ["s3:*"], 41 | "Resource": ["arn:aws:s3:::my-company2/home/User/*"] 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /web-app/tests/policies/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:ServerInfo"], 6 | "Effect": "Allow", 7 | "Sid": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /web-app/tests/policies/deleteObjectWithPrefix.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Effect": "Allow", 6 | "Action": ["s3:ListBucket"], 7 | "Resource": ["arn:aws:s3:::testbucket-*-test-1/*"] 8 | }, 9 | { 10 | "Effect": "Allow", 11 | "Action": ["s3:GetBucketLocation"], 12 | "Resource": ["arn:aws:s3:::testbucket-*-test-1"] 13 | }, 14 | { 15 | "Effect": "Allow", 16 | "Action": ["s3:*"], 17 | "Resource": [ 18 | "arn:aws:s3:::testbucket-*-test-1/digitalinsights/xref_cust_guid_actd*" 19 | ] 20 | }, 21 | 22 | { 23 | "Effect": "Allow", 24 | "Action": ["s3:ListBucket"], 25 | "Resource": ["arn:aws:s3:::testbucket-*-test-2/*"] 26 | }, 27 | { 28 | "Effect": "Allow", 29 | "Action": ["s3:GetBucketLocation"], 30 | "Resource": ["arn:aws:s3:::testbucket-*-test-2"] 31 | }, 32 | { 33 | "Effect": "Allow", 34 | "Action": ["s3:*"], 35 | "Resource": [ 36 | "arn:aws:s3:::testbucket-*-test-2/digitalinsights/xref_cust_guid_actd*" 37 | ] 38 | }, 39 | 40 | { 41 | "Effect": "Allow", 42 | "Action": ["s3:ListBucket"], 43 | "Resource": ["arn:aws:s3:::testbucket-*-test-3/*"] 44 | }, 45 | { 46 | "Effect": "Allow", 47 | "Action": ["s3:GetBucketLocation"], 48 | "Resource": ["arn:aws:s3:::testbucket-*-test-3"] 49 | }, 50 | { 51 | "Effect": "Allow", 52 | "Action": ["s3:*"], 53 | "Resource": [ 54 | "arn:aws:s3:::testbucket-*-test-3/digitalinsights/xref_cust_guid_actd*" 55 | ] 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /web-app/tests/policies/diagnostics.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:OBDInfo"], 6 | "Effect": "Allow", 7 | "Sid": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /web-app/tests/policies/fix-prefix-policy-ui-crash.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Effect": "Deny", 6 | "Action": ["admin:*"] 7 | }, 8 | { 9 | "Effect": "Allow", 10 | "Action": ["s3:GetBucketLocation", "s3:ListBucket"], 11 | "Resource": ["arn:aws:s3:::*testcafe/*"] 12 | }, 13 | { 14 | "Effect": "Allow", 15 | "Action": ["s3:GetObject", "s3:ListBucket"], 16 | "Resource": ["arn:aws:s3:::*testcafe/write/*"] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /web-app/tests/policies/groups.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": [ 6 | "admin:ListGroups", 7 | "admin:AddUserToGroup", 8 | "admin:EnableGroup", 9 | "admin:DisableGroup", 10 | "admin:RemoveUserFromGroup", 11 | "admin:GetGroup", 12 | "admin:ListUsers" 13 | ], 14 | "Effect": "Allow", 15 | "Sid": "" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /web-app/tests/policies/iamPolicies.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": [ 6 | "admin:GetPolicy", 7 | "admin:DeletePolicy", 8 | "admin:CreatePolicy", 9 | "admin:AttachUserOrGroupPolicy", 10 | "admin:ListUserPolicies" 11 | ], 12 | "Effect": "Allow", 13 | "Sid": "" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /web-app/tests/policies/inspect-allowed.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:*"], 6 | "Effect": "Allow", 7 | "Sid": "Allow_Admin_Actions" 8 | }, 9 | { 10 | "Action": ["s3:*"], 11 | "Effect": "Allow", 12 | "Resource": ["arn:aws:s3:::*"], 13 | "Sid": "Allow_S3_Actions" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /web-app/tests/policies/inspect-not-allowed.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:*"], 6 | "Effect": "Deny", 7 | "Sid": "Deny_Admin_Actions" 8 | }, 9 | { 10 | "Action": ["s3:*"], 11 | "Effect": "Allow", 12 | "Resource": ["arn:aws:s3:::*"], 13 | "Sid": "Allow_S3_Actions" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /web-app/tests/policies/logs.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:ConsoleLog"], 6 | "Effect": "Allow", 7 | "Sid": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /web-app/tests/policies/notificationEndpoints.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:ConfigUpdate"], 6 | "Effect": "Allow", 7 | "Sid": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /web-app/tests/policies/rewind-allowed.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Effect": "Deny", 6 | "Action": ["s3:CreateBucket", "s3:DeleteBucket"], 7 | "Resource": ["arn:aws:s3:::*"] 8 | }, 9 | { 10 | "Effect": "Allow", 11 | "Action": ["s3:ListBucket"], 12 | "Resource": ["arn:aws:s3:::bucketname"] 13 | }, 14 | { 15 | "Effect": "Allow", 16 | "Action": ["s3:GetBucketLocation", "s3:GetBucketVersioning"], 17 | "Resource": ["arn:aws:s3:::bucketname"] 18 | }, 19 | { 20 | "Effect": "Allow", 21 | "Action": ["s3:GetObject"], 22 | "Resource": [ 23 | "arn:aws:s3:::bucketname/firstlevel", 24 | "arn:aws:s3:::bucketname/firstlevel/*" 25 | ] 26 | }, 27 | { 28 | "Effect": "Allow", 29 | "Action": ["s3:*"], 30 | "Resource": [ 31 | "arn:aws:s3:::bucketname/firstlevel/secondlevel*", 32 | "arn:aws:s3:::bucketname/firstlevel/secondlevel/*" 33 | ] 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /web-app/tests/policies/rewind-not-allowed.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Effect": "Deny", 6 | "Action": ["s3:CreateBucket", "s3:DeleteBucket"], 7 | "Resource": ["arn:aws:s3:::*"] 8 | }, 9 | { 10 | "Effect": "Allow", 11 | "Action": ["s3:ListBucket"], 12 | "Resource": ["arn:aws:s3:::bucketname"] 13 | }, 14 | { 15 | "Effect": "Allow", 16 | "Action": ["s3:GetBucketLocation"], 17 | "Resource": ["arn:aws:s3:::bucketname"] 18 | }, 19 | { 20 | "Effect": "Allow", 21 | "Action": ["s3:GetObject"], 22 | "Resource": [ 23 | "arn:aws:s3:::bucketname/firstlevel", 24 | "arn:aws:s3:::bucketname/firstlevel/*" 25 | ] 26 | }, 27 | { 28 | "Effect": "Allow", 29 | "Action": ["s3:*"], 30 | "Resource": [ 31 | "arn:aws:s3:::bucketname/firstlevel/secondlevel*", 32 | "arn:aws:s3:::bucketname/firstlevel/secondlevel/*" 33 | ] 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /web-app/tests/policies/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:ConfigUpdate"], 6 | "Effect": "Allow", 7 | "Sid": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /web-app/tests/policies/tiers.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:ListTier", "admin:SetTier"], 6 | "Effect": "Allow", 7 | "Sid": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /web-app/tests/policies/trace.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["admin:ServerTrace"], 6 | "Effect": "Allow", 7 | "Sid": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /web-app/tests/policies/users.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": [ 6 | "admin:ListUsers", 7 | "admin:CreateUser", 8 | "admin:DeleteUser", 9 | "admin:GetUser", 10 | "admin:EnableUser", 11 | "admin:DisableUser", 12 | "admin:ListUserPolicies", 13 | "admin:ListGroups", 14 | "admin:GetPolicy", 15 | "admin:AttachUserOrGroupPolicy", 16 | "admin:AddUserToGroup", 17 | "admin:RemoveUserFromGroup", 18 | "admin:GetGroup" 19 | ], 20 | "Effect": "Allow", 21 | "Resource": ["arn:aws:s3:::*"], 22 | "Sid": "" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /web-app/tests/policies/watch.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Action": ["s3:ListenBucketNotification", "s3:ListBucket"], 6 | "Effect": "Allow", 7 | "Resource": ["arn:aws:s3:::*"], 8 | "Sid": "" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /web-app/tests/scripts/resources/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | namespace: minio-operator 4 | 5 | images: 6 | - name: minio/operator 7 | 8 | resources: 9 | - github.com/minio/operator/resources/ 10 | -------------------------------------------------------------------------------- /web-app/tests/scripts/tenant-kes-encryption/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | namespace: tenant-kms-encrypted 4 | 5 | images: 6 | - name: minio/operator 7 | 8 | resources: 9 | - github.com/minio/operator/examples/kustomization/tenant-kes-encryption 10 | -------------------------------------------------------------------------------- /web-app/tests/scripts/tenant-lite/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | namespace: tenant-lite 4 | 5 | images: 6 | - name: minio/operator 7 | 8 | resources: 9 | - github.com/minio/operator/examples/kustomization/tenant-lite 10 | -------------------------------------------------------------------------------- /web-app/tests/subpath-nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | events { worker_connections 1024; } 2 | http { 3 | server { 4 | listen 8000; 5 | location /console/subpath/ { 6 | rewrite ^/console/subpath/(.*) /$1 break; 7 | proxy_pass http://host.docker.internal:9090; 8 | 9 | proxy_http_version 1.1; 10 | proxy_set_header Upgrade $http_upgrade; 11 | proxy_set_header Connection "Upgrade"; 12 | proxy_set_header Host $host; 13 | proxy_set_header X-Real-IP $remote_addr; 14 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 15 | proxy_set_header X-Forwarded-Proto $scheme; 16 | 17 | # This allows WebSocket connections 18 | proxy_set_header Upgrade $http_upgrade; 19 | proxy_set_header Connection "upgrade"; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /web-app/tests/subpath-nginx/test-unauthenticated-user.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2023 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | import * as elements from "../utils/elements"; 18 | 19 | // Using subpath defined in `MINIO_BROWSER_REDIRECT_URL` 20 | const appBaseUrl = "http://localhost:8000/console/subpath"; 21 | let rootUrl = `${appBaseUrl}/`; 22 | 23 | fixture("Tests using subpath").page(appBaseUrl); 24 | 25 | test("RootUrl redirects to Login Page", async (t) => { 26 | const loginButtonExists = elements.loginButton.exists; 27 | await t.navigateTo(rootUrl).expect(loginButtonExists).ok().wait(2000); 28 | }); 29 | -------------------------------------------------------------------------------- /web-app/tests/uploads/file1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/tests/uploads/file1.pdf -------------------------------------------------------------------------------- /web-app/tests/uploads/filescript.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/tests/uploads/filescript.pdf -------------------------------------------------------------------------------- /web-app/tests/uploads/internode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minio/object-browser/ecce0930624eca719cb7fd44c4758751d8718432/web-app/tests/uploads/internode.png -------------------------------------------------------------------------------- /web-app/tests/uploads/noextension: -------------------------------------------------------------------------------- 1 | a demo file 2 | -------------------------------------------------------------------------------- /web-app/tests/uploads/test.txt: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /web-app/tests/utils/constants.ts: -------------------------------------------------------------------------------- 1 | // This file is part of MinIO Console Server 2 | // Copyright (c) 2022 MinIO, Inc. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | import { readFileSync } from "fs"; 17 | 18 | const data = readFileSync(__dirname + "/../constants/timestamp.txt", "utf-8"); 19 | const unixTimestamp = data.trim(); 20 | 21 | export const TEST_BUCKET_NAME = "testbucket-" + unixTimestamp; 22 | export const TEST_GROUP_NAME = "testgroup-" + unixTimestamp; 23 | export const TEST_USER_NAME = "testuser-" + unixTimestamp; 24 | export const TEST_PASSWORD = "password"; 25 | export const TEST_IAM_POLICY_NAME = "testpolicy-" + unixTimestamp; 26 | export const TEST_IAM_POLICY = JSON.stringify({ 27 | Version: "2012-10-17", 28 | Statement: [ 29 | { 30 | Action: ["admin:*"], 31 | Effect: "Allow", 32 | Sid: "", 33 | }, 34 | { 35 | Action: ["s3:*"], 36 | Effect: "Allow", 37 | Resource: ["arn:aws:s3:::*"], 38 | Sid: "", 39 | }, 40 | ], 41 | }); 42 | export const TEST_ASSIGN_POLICY_NAME = "consoleAdmin"; 43 | -------------------------------------------------------------------------------- /web-app/tsconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react-jsxdev" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /web-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2015", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "esModuleInterop": true, 8 | "allowSyntheticDefaultImports": true, 9 | "strict": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "jsx": "react-jsx", 17 | "downlevelIteration": true, 18 | "noFallthroughCasesInSwitch": true, 19 | "baseUrl": "./src", 20 | "rootDir": "./src" 21 | }, 22 | "include": ["src"] 23 | } 24 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | --------------------------------------------------------------------------------