Compare commits

...

1196 Commits

Author SHA1 Message Date
Cesar N
c96c95924c Release v0.32.0 (#2924) 2023-07-06 10:32:39 -07:00
Alex
f02786001c Migrated Groups Module components to mds (#2923)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-07-05 22:29:17 -06:00
Alex
542b7192c3 Migrated Users Module components to mds (#2920)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-07-05 17:21:07 -07:00
Javier Adriel
b31aa10b52 Refactor to swagger TS API (#2903) 2023-07-05 17:27:46 -06:00
jiuker
1eba59954d fix: websockets goroutine leak for object list UI (#2805)
listen on the done channel to ensure that we can clean up 
the WebSocket go-routine, once the caller is done with
writing the response.
2023-07-05 12:17:54 -07:00
jinapurapu
b71d9f05c5 Updated placeholderimage for offline HelpMenu items (#2916) 2023-06-30 18:35:04 -06:00
Daniel Valdivia
fc5e94d55f Remove Cross compile jobs (#2915) 2023-06-29 18:57:14 -06:00
Alex
3875fb3eaa Release v0.31.0 (#2912)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-29 12:21:34 -07:00
Aditya Manthramurthy
b3d4132fe6 Remove goreleaser (#2914)
Not needed any more as standalone console deploys are not supported any more.
2023-06-29 11:15:58 -06:00
Alex
21f20bb9ea Migrated Policies module to mds (#2911)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-28 18:23:58 -06:00
Alex
df937467a0 Fixed Bucket Events Notifications Page (#2906)
- Added missing ilm & replica supported types
- Fixed add screen crash when no arn is selected
- Migrated components to mds

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-28 15:39:02 -06:00
Alex
d1ae271111 Replaced CodeMirrorWrapper internal components (#2910)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-28 12:05:18 -07:00
Alex
e7fb3e0e45 Updated console dependencies (#2909)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-26 14:12:09 -06:00
dependabot[bot]
b7b0271ec7 Bump fast-xml-parser from 4.2.4 to 4.2.5 in /portal-ui (#2904)
Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 21:41:22 -06:00
jinapurapu
9935b839b7 Help menu cleanup (#2905) 2023-06-22 20:25:06 -06:00
Cesar N
0e11098c31 Upgrade semver version to address vulnerability (#2902) 2023-06-22 17:54:14 -04:00
Daniel Valdivia
c55e0a069b Format number of objects (#2901) 2023-06-22 12:59:16 -07:00
jinapurapu
c3da876b04 Added placeholder image to HelpMenu if links unavailable (#2899) 2023-06-22 12:12:13 -07:00
Alex
643a9c6c7c Updated Audit Logs page to use mds (#2897)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-21 14:32:19 -06:00
Aditya Manthramurthy
0c3a94172d Bump up madmin-go to v3.0.2 (#2896) 2023-06-21 10:51:12 -07:00
Javier Adriel
527eb16700 Refactor to swagger TS API (#2888)
Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2023-06-20 12:46:20 -07:00
Alex
e3aec3f094 Updated mds to v0.6.4 (#2895) 2023-06-20 11:49:58 -07:00
Alex
eac2734df4 Update mds to v0.6.2 (#2894) 2023-06-20 11:37:09 -06:00
Allan Roger Reid
a411e7c977 Create bug_report.md (#2893) 2023-06-19 19:58:26 -07:00
Prakash Senthil Vel
28c4abe2d0 audit only the dependencies and exclude dev dependencies in ci for ui (#2892) 2023-06-19 10:55:20 -06:00
Javier Adriel
a9ef6ebf5f Fix download of folders (#2891) 2023-06-19 10:54:18 -06:00
Ali Garajian
c12415c12d Virtualize download/upload object list (#2889) 2023-06-16 13:31:39 -06:00
Cesar N
1f481e690b Add CHANGELOG file for Releases (#2887) 2023-06-15 14:21:27 -07:00
Alex
58aad859e1 Release v0.30.0 (#2886) 2023-06-15 13:13:53 -07:00
jinapurapu
b9ebfe09ee Removed console.log (#2885) 2023-06-15 12:52:24 -06:00
Prakash Senthil Vel
864cf7af99 Apply policy resource restrictions for file extensions (#2842) 2023-06-15 11:33:52 -07:00
Javier Adriel
b76f460979 Remove dead code and add job in CI to find it (#2882) 2023-06-15 10:24:24 -06:00
Cesar N
cbd2c4682d Raise error on upload artifact if no files (#2884)
Raise error on artifact upload if no files to upload

Co-authored-by: cesnietor <>
2023-06-15 09:00:51 -07:00
Javier Adriel
d49bdf7d49 Add staticcheck to console API (#2883) 2023-06-14 21:35:00 -06:00
dependabot[bot]
559a7278a0 Bump github.com/lestrrat-go/jwx from 1.2.25 to 1.2.26 (#2879) 2023-06-14 17:16:17 -06:00
Daniel Valdivia
4a172fae97 Pass Client IP address to MinIO on x-forwarded-for header (#2864) 2023-06-14 12:36:48 -07:00
Cesar N
fc4263e2f9 Define action version to Git action (#2875) 2023-06-13 18:16:46 -06:00
Cesar N
c1b9b4c81b Add Git job to add new issues to project (#2873) 2023-06-13 17:36:21 -06:00
Javier Adriel
aa9b73522e Refactor to swagger ts API (#2860) 2023-06-13 15:00:56 -07:00
Alex
0904f83627 Fix playwright (#2867)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-13 14:43:28 -07:00
Cesar N
253053cc23 Refactor session to avoid duplicate calls to apis (#2868)
Co-authored-by: cesnietor <>
2023-06-13 14:27:48 -07:00
Alex
08a3ff65c7 Updated menu component to use mds (#2866)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-13 15:16:46 -06:00
jinapurapu
ee8fac8be8 Removed debugging line (#2870)
Co-authored-by: Jillian Inapurapu <jillii@Jillians-MacBook-Pro.local>
2023-06-13 11:48:25 -07:00
jinapurapu
9fa49b40b3 Console help menu (#2804)
Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
2023-06-12 14:50:25 -07:00
Javier Adriel
de13119e02 Use swagger autogenerated ts API for session endpoint (#2859) 2023-06-12 15:00:40 -06:00
Alex
bf9acd7691 Share File access key / secret key rollback (#2863)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-12 14:02:38 -06:00
Alex
a5066fecc8 Update mds to v0.6.0 (#2862)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-12 11:55:23 -07:00
jinapurapu
6432681440 Minor tooltip fixes (#2861) 2023-06-12 09:54:07 -06:00
jinapurapu
b3b6df9d82 Minor fixes to Config screen tooltips (#2857) 2023-06-08 23:28:28 -06:00
Alex
fe7be4ef62 Fixed an issue with subpaths in resources policies (#2856)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-08 17:37:45 -06:00
Javier Adriel
b4603547f6 Add tests for remote buckets handlers (#2843) 2023-06-08 13:06:49 -06:00
Javier Adriel
b33b9315ea Fix fast-xml-parser vulnerability (#2855) 2023-06-06 11:55:23 -07:00
BlockListed
6ae03fa028 Fix spelling in file sharing menu (#2853) 2023-06-04 12:23:25 -06:00
MinIO Bot
e1bb1e0472 mds-released-v0.5.1 (#2851) 2023-06-02 20:45:08 -06:00
Alex
411670e4f5 Release v0.29.0 (#2850)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-02 13:51:48 -07:00
Alex
1c55932f84 Updated console dependencies (#2849) 2023-06-02 12:58:07 -06:00
Kaan Kabalak
5a77054d6b Update Service Acct fns based on new ListServiceAccounts type (#2824)
* Update Service Acct fns based on new ListServiceAccounts type
2023-05-30 10:30:02 -07:00
Alex
84c5fd58f9 Display error snack bar on raw policy edit error (#2841)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-05-29 18:05:42 -06:00
Daniel Valdivia
98979911ee Move Login to Typescript Swagger API (#2839)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-05-29 13:52:29 -07:00
Alex
c0cf7358c7 Removed hardcoded background in access keys table (#2837)
## What does this do?

Removed non required classes from access keys table

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-05-28 18:47:10 -07:00
Alex
9053e64dff Fixed multiselection of items after deleting one service account (#2836) 2023-05-26 16:58:01 -06:00
Alex
57bfe97d08 Release v0.28.0 (#2831) 2023-05-26 13:42:42 -07:00
Alex
028570279c Migrated Access Keys page components to mds (#2834)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-05-26 11:24:34 -06:00
MinIO Bot
bda1cd1f25 mds-released-V0.4.3 (#2830)
Co-authored-by: MinIO Bot <minio.bot@minio.io>
2023-05-24 11:37:48 -07:00
Alex
7a9b775b09 Changed Share Object logic to use Access Keys (#2827)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-05-24 10:52:40 -07:00
Daniel Valdivia
17e791afb9 Replace RIGHT-TO-LEFT OVERRIDE unicode (#2828)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-05-23 09:47:12 -06:00
Daniel Valdivia
920fc7d937 Fix Subpath behavior (#2818)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-05-22 12:30:59 -07:00
GeekTR
6e314a2fa5 Fix crash when backend has no rrSCParity property (#2826) 2023-05-22 13:14:41 -06:00
Alex
dc90db6591 Changed SSO Login screen to hide login form by default (#2807)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-05-22 11:20:45 -06:00
Prakash Senthil Vel
beed4895c1 Apply permission check for create accesskey button (#2822) 2023-05-22 09:26:31 -07:00
Prakash Senthil Vel
629dd669c4 Fix anonymous access rule not displayed due to style (#2820) 2023-05-18 10:54:21 -06:00
Alex
fc9319e55b Added identifier field to Event destinations page & migrated to mds (#2816) 2023-05-16 20:21:31 -06:00
Alex
58b64a5739 Fixed an issue with allowResources & KeyBar (#2817) 2023-05-16 16:53:32 -06:00
Javier Adriel
d93537261e Fix download of large files in Console (#2773) 2023-05-15 11:31:43 -07:00
Prakash Senthil Vel
22ec87d00e improve playwright tests with refactoring and clean up (#2809) 2023-05-15 10:02:40 -06:00
MinIO Bot
b87b4156e7 mds-released-v0.4.2 (#2815)
Co-authored-by: MinIO Bot <minio.bot@minio.io>
2023-05-12 18:55:23 -06:00
Alex
93f010b880 Release v0.27.0 (#2813)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-05-10 21:33:38 -07:00
Prakash Senthil Vel
c5d4cdf1bc fix to show or hide show deleted objects option based on versioning status (#2780) 2023-05-10 11:36:49 -06:00
Anis Eleuch
c117601e53 Update madmin-go to 2.1.1 (#2810)
Update madmin-go library + github.com/minio/mc

Also update the code to work with the library update

Co-authored-by: Anis Elleuch <anis@min.io>
2023-05-09 10:49:51 -07:00
MinIO Bot
f78f838ed9 mds-released-v0.4.1 (#2808)
Co-authored-by: MinIO Bot <minio.bot@minio.io>
2023-05-09 10:03:49 -06:00
Alex
1583b69fb7 Made Service Account creation consistent with mc (#2801) 2023-05-03 12:33:21 -06:00
Alex
cde6d1b0e0 Added Disable login animation with env variable (#2799)
Set CONSOLE_ANIMATED_LOGIN=off env variable before running Console binary

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-05-03 11:36:41 -06:00
Alex
be60569a14 Changed Object Browser components to use new mds components (#2796) 2023-05-02 17:29:21 -07:00
Alex
51226a74d0 Release v0.26.4 (#2798)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-05-02 18:01:09 -06:00
Daniel Valdivia
e983473a54 Upgrade Go Dependencies (#2786)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-05-02 14:35:22 -06:00
Kaan Kabalak
211ab3fd9d Fix incorrect logo appearing for Standard License holders (#2797) 2023-05-01 14:50:01 -06:00
Javier Adriel
90c8ea7f09 Use PageLayout from mds (#2789) 2023-04-29 21:16:09 -06:00
Alex
fb5193d896 Updated mds to v0.4.0 (#2794) 2023-04-27 19:50:21 -06:00
Alex
f7a7f01d7d Fixed issue while getting locking status of a bucket (#2790)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-26 09:59:58 -06:00
Javier Adriel
2c84a52937 Use FormLayout from mds (#2788) 2023-04-25 14:22:49 -06:00
Cesar Celis Hernandez
6020590b2f Make playwright run faster (#2737) 2023-04-25 09:19:00 -07:00
Alex
1477def4fe Updated Console UI dependencies (#2787)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-24 23:19:22 -07:00
Javier Adriel
8882f1da0e Fix yaml vulnerability (#2785)
Bump yaml package version to 2.2.2 to address unhandled exception [CVE-2023-2251](https://nvd.nist.gov/vuln/detail/CVE-2023-2251)

More details on https://github.com/advisories/GHSA-f9xv-q969-pqx4
2023-04-24 16:40:17 -07:00
Cesar N
056d487f1c Show progress bar when loading Usage Info (#2784) 2023-04-19 22:06:16 -06:00
Cesar N
b8083215b3 Update Dev Docs with MinIO naming conventions (#2783) 2023-04-19 11:12:21 -07:00
Cesar N
61c864e748 Update Dev Documentation (#2781) 2023-04-19 10:47:15 -06:00
Javier Adriel
0e0f5030da Remove health diagnostic warning (#2779) 2023-04-17 17:00:03 -06:00
Alex
0dacc4d49e Changed breadcrumbs back button behavior (#2776)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-12 17:23:04 -06:00
Alex
4d783c5e42 Added Object Version read-only field in Edit Lifecycle Modal (#2772) 2023-04-11 17:33:16 -06:00
Alex
75b3a6bea4 Fixed Object Version selector visibility in Add Lifecycle Rule modal (#2769)
- Fixed Object Version selector visibility in Add Lifecycle Rule modal
- Changed definition in swagger file to match camelCase standard
- Added a playwright test case to avoid this issue in the future

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-11 11:01:03 +02:00
Alex
29507cda7e Updated xml2js library (#2770)
## What does this do?

Updated xml2js library for tests in console. Will fix this in minio-js
as well in an upcoming PR

## How does it look?
<img width="391" alt="Screenshot 2023-04-10 at 21 58 04"
src="https://user-images.githubusercontent.com/33497058/231052457-dac4b376-d1b8-4fd2-80e2-10892f8a453d.png">

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-11 10:36:03 +02:00
Alex
81e0c82fee Changed GitHub labels (#2768)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-10 14:05:08 -06:00
Alex
7519fad6dd Release v0.26.3 (#2764)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-06 09:45:15 -07:00
Prakash Senthil Vel
248a59ee8c compliance license faq updated (#2762) 2023-04-06 10:11:34 -06:00
Alex
cefb6d3c95 Release v0.26.2 (#2761)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-05 14:12:30 -07:00
Alex
543076eaac Release v0.26.1 (#2759)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-05 13:11:39 -07:00
Alex
cbf1ddeb4c Added support for root credentials login with LDAP enabled (#2758)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-04 15:38:32 -06:00
Daniel Valdivia
3746adcc13 Update Login Message (#2757) 2023-04-04 12:24:10 +02:00
Alex
854b984850 Display explicit errors if websocket connection cannot be stablished (#2756)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-04-03 18:10:59 -06:00
Alex
62fa0e2043 Updated Entities results panel styles (#2753)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-31 22:09:37 -06:00
Javier Adriel
4f5b1b0aa7 Show modal to restart minio after subnet register (#2752) 2023-03-31 17:31:54 -06:00
MinIO Bot
0e362c2106 mds-released-v0.3.3 (#2750)
Co-authored-by: MinIO Bot <minio.bot@minio.io>
2023-03-30 14:11:56 +09:00
Alex
6ac5be32b2 Release v0.26.0 (#2746)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-27 17:12:21 -07:00
Harshavardhana
6966183bc8 Update deps and fix build issues (#2745) 2023-03-27 15:30:52 -06:00
Alex
60d70e3668 Added anonymous access modal in folder selection (#2736)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-23 12:05:16 -06:00
jinapurapu
5e65f2aced Fixed Drives offline card UI (#2732) 2023-03-23 09:53:21 -06:00
jinapurapu
1e345364cf Fixed refresh button on ListObjects screen (#2728) 2023-03-22 15:39:44 -06:00
jinapurapu
502a6c462f Fixed snackMessage to display if error returned creating policy (#2726) 2023-03-22 15:39:08 -06:00
Javier Adriel
ceafdb9cb4 Fix revive lint issues (#2730) 2023-03-22 15:06:04 -06:00
Alex
a6d8f6beaa Added Audit Kafka configuration panel (#2724) 2023-03-21 10:07:56 -06:00
Alex
fa1f84bd0a Release v0.25.1 (#2723)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-17 17:34:30 -07:00
Alex
72a1e5eefb Changed response type for Add bucket (#2721)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-17 17:36:42 -06:00
Cesar Celis Hernandez
f20fa0b1c8 Condensing Successful responses (#2722) 2023-03-17 17:12:59 -06:00
Alex
07b7af59b6 Minor Adjustments (#2719)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-17 11:28:12 -06:00
jinapurapu
c9ac525358 Tenant health info upload (#2606)
For registered clusters, after generating the Health Info report, Health Info is uploaded to Subnet, and latest metrics are visible in Subnet.
Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
2023-03-17 09:42:01 -07:00
Daniel Valdivia
8b1b2b1e2d Introducer swagger typescript api (#2704)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-03-17 09:57:45 -06:00
Alex
ad0591ec17 Updated yarn packages (#2718)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-17 08:30:58 -07:00
Alex
59c47d98dd Reactivated Enable / Disable LDAP functionality (#2714)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-16 15:18:47 -07:00
Alex
cb38a545ce Fixed navigation after bucket creation (#2713)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-16 14:11:03 -06:00
Alex
dd356b6ea9 LDAP Page improvements (#2708)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-16 11:48:59 -06:00
Alex
c1d39a910f Display Menu Headers (#2712)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-16 09:42:58 -06:00
Alex
eb3913ba48 Fixed issues in Embeddable Object Browser (#2711)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-16 09:42:35 -06:00
dependabot[bot]
f7efbc66f7 Bump webpack from 5.75.0 to 5.76.1 in /portal-ui (#2707) 2023-03-14 12:58:33 -07:00
Alex
f368d9936a Adjusted dropdown box styles in login page (#2706)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-14 11:24:46 -06:00
Cesar Celis Hernandez
5cb4e6f651 Adopting Playwright (#2702) 2023-03-14 09:26:06 -06:00
Daniel Valdivia
f7f7b087c4 Hide Header and Padding on iframed Metrics (#2703)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-03-13 22:42:19 -06:00
Alex
4cceee8936 Added LDAP Entities API (#2700) 2023-03-10 09:16:29 -06:00
Prakash Senthil Vel
5262c02a28 improve airgap license update user experience (#2697) 2023-03-08 23:25:49 -06:00
Daniel Valdivia
fd81529ddc Upgrade Go Dependencies (#2699)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-03-08 23:24:46 -06:00
Daniel Valdivia
383341ad61 Update UI Dependencies (#2698)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-03-08 18:21:05 -06:00
Daniel Valdivia
66d0182825 Release v0.25.0 (#2696)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-03-08 09:17:03 -08:00
Alex
1fc9a40273 Changed IDP login support in console (#2695)
- Allowed to use External IDP + Built-in IDP at the same time
- Added IDP type to IDP listing
- Added IDP name when no display name is configured
- Changed STS login link into new menu
- Cleanup of Operator login strategies

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-03-07 14:10:21 -08:00
Daniel Valdivia
1953a98968 Ref Con for Login Page Links (#2694) 2023-03-06 16:12:25 -08:00
Cesar Celis Hernandez
3b5979d783 Compiling when cache is missing (#2688) 2023-03-03 09:11:00 -08:00
Harshavardhana
9aa1f43df7 move to UBI micro image (#2684)
Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2023-03-02 20:42:28 -08:00
Daniel Valdivia
bf89f09238 Removing Operator UI (#2692)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-03-02 21:35:08 -06:00
Prakash Senthil Vel
b8e14ee269 improve versioning status display and delete with versions when versioning is suspended (#2689) 2023-03-02 12:41:44 -06:00
Prakash Senthil Vel
c700ee491e fix luxon time parsing format to fix the invalid time in the logs screen (#2691) 2023-03-02 09:42:54 -08:00
Alex
65575751ff Release v0.24.0 (#2679)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-28 12:53:47 -08:00
Alex
cc28f88325 Update Operator version and fixed issue in operator console (#2686) 2023-02-27 23:53:41 -08:00
Harshavardhana
dd913decc6 Use global HTTP client whenever applicable (#2682) 2023-02-27 19:19:56 -06:00
jinapurapu
372852ee86 Fixed tooltip on Add Access Rule modal (#2683) 2023-02-27 09:42:04 -06:00
Alex
154974c24e Disabled Preview button for text files (#2680)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-23 15:25:04 -06:00
Daniel Valdivia
844041fc32 Upgrade Go Dependencies (#2676)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-23 09:55:40 -06:00
Alex
c23aff45c8 Hidden red notification in License menu when cluster is registered (#2678)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-21 19:12:03 -06:00
Daniel Valdivia
1b4eacb587 Remove Chartsjs and react-chartjs-2 (#2677)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-21 17:33:04 -06:00
Prakash Senthil Vel
f21434a971 Export import server config from settings page (#2664) 2023-02-21 11:50:04 -08:00
Alex
6c0e7baa87 Updated mds to v0.2.5 (#2675)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-21 09:41:09 -08:00
Alex
09fe3af6b7 Removed confirmation box in enable call home screen (#2674)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-21 10:28:09 -06:00
dependabot[bot]
50a6c61d0d Bump golang.org/x/net from 0.5.0 to 0.7.0 (#2672) 2023-02-20 19:38:35 -08:00
Daniel Valdivia
53b5fba532 Wordng updates on Call-Home (#2673)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-18 23:43:16 -08:00
Javier Adriel
a73b710313 Change updates service url (#2658) 2023-02-14 12:56:45 -06:00
Alex
404b1ef92e Restored ObjectManagerButton (#2665)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-14 11:36:49 -06:00
Alex
c3b7af9c89 Close Delete Object modal on Access Denied error. (#2661)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-14 09:56:09 -06:00
Alex
13d04b15de Fixed DateTime interaction with DateTimePickerWrapper & DateRangeSelector (#2657)
fixes #2655 
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-13 22:03:26 -08:00
Daniel Valdivia
88fdd3a456 Remove Unused Health Component (#2659)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-13 18:29:42 -06:00
Alex
de4ff1c1f0 Call Home Enabled in console (#2248)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-13 15:04:35 -08:00
Javier Adriel
a6637f18c8 Add fields to read json metadata (#2652) 2023-02-10 13:48:47 -06:00
Alex
d4031ee7b5 Display override settings with env variables (#2636)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-10 11:28:54 -08:00
Alex
7bf2b9601f Fixed RegisterCluster alignment (#2653)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-10 12:01:10 -06:00
Javier Adriel
6fbb4b568b Add handlers that will communicate with release service (#2651) 2023-02-09 12:49:07 -08:00
Alex
7a14f0c012 Release v0.23.1 (#2648)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-08 18:20:55 -08:00
Daniel Valdivia
e8f27228a2 Use latest Version of Operator for Testing (#2650) 2023-02-08 19:08:20 -06:00
jinapurapu
8346fe4bd6 Fixed permissions-2 inspect test (#2649)
Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
2023-02-08 16:13:01 -08:00
Alex
d1b8d7240e Update mds version to v0.2.4 (#2647)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-08 14:11:52 -06:00
jinapurapu
274b16a1a6 Fixed text in AddEventDestination backlink for consistency (#2646) 2023-02-08 13:21:35 -06:00
Daniel Valdivia
b0d8c332e5 Rename Notification Endpoints (#2645)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-08 12:16:07 -06:00
Daniel Valdivia
ba1888b6c4 Remove unused components (#2641)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-08 11:17:16 -06:00
Daniel Valdivia
c0e47bafa4 Menu Tweaks and Rename Notifications to Events (#2639)
- Rename notifications to events.
- Add categories to event destinations
- Menu changes

Co-authored-by: jinapurapu <65002498+jinapurapu@users.noreply.github.com>
2023-02-07 21:19:17 -08:00
Alex
894f6ce131 Fixed Tenant License crash in tenant details (#2644)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-07 22:30:25 -06:00
Alex
f0b39a6b6b Updated copyright tags to 2023 (#2631)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-06 20:32:49 -08:00
Daniel Valdivia
24fdf3487b Move Register Component to Redux (#2630)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-06 13:51:39 -08:00
Shubhendu
900b8d9f06 Disable Audit Log and Monitoring by default (#2632)
While tenant creation, by default keep the Audit Log and Monitoring option disabled
2023-02-06 12:03:51 -08:00
Alex
58b45b8ebc Redesigned Logger Webhooks & Audit Webhooks pages (#2620)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-02 21:22:43 -08:00
Daniel Valdivia
606a69b92c Remove Unused Style code (#2629)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-02 22:42:15 -06:00
Allan Roger Reid
2c8b96c511 Expose error on Tenant if certificate is near expiration or expired (#2628) 2023-02-02 17:44:37 -08:00
Javier Adriel
38e6af1d09 Add tests for tenantEncryptionInfo (#2625) 2023-02-02 13:11:47 -06:00
Alex
32a289d563 Added runtime class name selector (#2626)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-01 20:58:19 -08:00
Daniel Valdivia
8d4d6eace0 Remove unused CSS Classes (#2623) 2023-02-01 18:37:18 -08:00
Alex
f337a8dce7 Updated Yarn dependencies (#2627) 2023-02-01 18:10:16 -08:00
jinapurapu
fba06cf651 Fix UI to access Support tools if registered (#2624) 2023-02-01 19:42:40 -06:00
Daniel Valdivia
fecf484eda Reformat imports (#2622)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-01 14:33:03 -08:00
Daniel Valdivia
34907856c5 Use MDS's BackLink (#2615)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-02-01 14:14:47 -06:00
Javier Adriel
4a2915a62b Use MDS's PageHeader (#2618) 2023-01-31 17:37:56 -06:00
Alex
8d51fe60f4 Update mds to v0.2.3 (#2617)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-31 13:53:58 -06:00
Daniel Valdivia
e96632a6b2 License Page Adjustments. Fix Object Browser double scroll. (#2616)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-31 13:15:28 -06:00
Daniel Valdivia
5ba7abaa79 Use MDS HelpBox (#2614)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-31 11:12:23 -06:00
Daniel Valdivia
451238d48b Disable Audit Logs by default on Tenant Creation (#2613)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-31 08:23:29 -08:00
Javier Adriel
8df91922ad Add test for tenantUpdateEncryption (#2611) 2023-01-30 16:34:33 -08:00
Anis Elleuch
34d62837fd Trust STS IDP connection when the url is localhost (#2603)
During SSO login, Console contacts MinIO server to generate new temporary credentials. When TLS is enabled, setting up a correct TLS certificate is something that needs to be done correctly by the user. However, recently, we started to skip the TLS verification when Console talks to MinIO server using a loopback address, but we missed the case of Console generating temporary credentials in case of IDP. This commit will get the configured MinIO server url to decide if the STS call needs to skip the TLS verification or not.

Co-authored-by: Anis Elleuch <anis@min.io>
2023-01-27 14:26:30 -08:00
Alex
ed281bbe4a Update mds to v0.2.1 (#2609)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-27 14:25:54 -08:00
Daniel Valdivia
b218cbf503 Anonymous Access (#2600)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-27 12:23:30 -08:00
Javier Adriel
c141b6d65e Add tests for setTenantMonitoring (#2608) 2023-01-26 18:35:49 -06:00
Alex
aacec617a8 Added bucket icons to object browser buckets listing (#2607)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-26 17:40:22 -06:00
Alex
ed19f3e1ad UI Fixes for License Plans page (#2605)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-26 14:45:39 -08:00
Javier Adriel
1374cf047e Add tests for updateTenantPools (#2602) 2023-01-26 10:30:52 -08:00
Daniel Valdivia
3a0e4c4f8c License Meta Tag (#2601)
Introduces a meta tag `minio-license` so that we can render the proper logo on login and menu
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-25 13:18:41 -08:00
Javier Adriel
b34b05f059 Tests for getTenantMonitoringResponse, getTenantUsage and getTenantPods (#2599) 2023-01-24 21:28:46 -06:00
Daniel Valdivia
579e8e05b7 Fix Login Warning (#2597)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2023-01-24 11:17:00 -06:00
Daniel Valdivia
a0463f405d Github Action .nvmrc (#2596)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2023-01-24 10:30:19 -06:00
Daniel Valdivia
ec344654db Release v0.23.0 (#2595)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2023-01-23 20:32:40 -08:00
Daniel Valdivia
4aab5bc68f Fix Logout Warning (#2594)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2023-01-23 21:56:37 -06:00
Alex
4c37afb446 Removed Force Delete from delete multiple objects request (#2592)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-23 19:53:20 -08:00
Daniel Valdivia
86115afc6b Upgrade Dependencies (#2589)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-23 19:51:29 -08:00
Alex
87399d1064 Fixed WS reconnection logic onError and onClose (#2591)
Removes duplicated reconnection request when error is reached on Object
Browser websocket, also removed the use of the connect call back as it
will contain references to the initial request and it is not necessary
as we already have information available.

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-24 08:13:52 +05:30
Alex
a01b855d2f Fixed issues with ThemedLogo component implementation (#2588)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-23 14:17:50 -06:00
Harshavardhana
be39cb5af3 update gorilla/websocket to minio/websocket (#2587) 2023-01-23 13:48:21 -06:00
Javier Adriel
6930fd198c Add tests for setImageRegistry tenantAdministrators and tenantConfiguration (#2584) 2023-01-23 10:56:54 -08:00
Daniel Valdivia
62e822df4e License FAQ (#2581)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-23 10:33:15 -08:00
Daniel Valdivia
6466687a27 Update superagent dependency (#2586)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-23 10:15:23 -08:00
Javier Adriel
ccaaa21f16 Move adminClientMock methods to single file (#2583) 2023-01-23 10:10:51 -06:00
Javier Adriel
0595ec166d Add tests to update tenant security and identity provider (#2580) 2023-01-20 14:26:59 -08:00
Daniel Valdivia
72d1698242 Upgrade Go Dependencies and mds (#2582)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-20 14:26:22 -08:00
Alex
9321e00d0a Made Improvements to Console System (#2579)
- Removed Lato font references in code making Inter font as default
- Rejected direct requests to static assets folders

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-19 11:15:28 -08:00
Javier Adriel
b03a49e4e1 Add tests for getTenantSecurity and getTenantIdentityProvider (#2578) 2023-01-19 11:44:55 -06:00
Javier Adriel
aa9f6f02ca Refactor and tests for adding tenant (#2577) 2023-01-13 11:11:40 -08:00
Allan Roger Reid
6a88d26054 Add tenant runtimeclass (#2565) 2023-01-12 14:27:53 -08:00
Daniel Valdivia
37db97dba9 Tests for User Objects (#2574)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-12 11:56:26 -08:00
Daniel Valdivia
0ccce2b2bc Update README.md screenshots (#2575)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-12 10:36:27 -08:00
Daniel Valdivia
58813eb4e0 Re-use MinIO latest binary (#2572)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-12 10:04:07 -08:00
Javier Adriel
5992edb3ba Refactor of tenant creation to make it more testable and readable (Phase 1) (#2571) 2023-01-12 09:17:57 -08:00
Daniel Valdivia
808e0ce3d5 Make remote buckets tests local (#2570)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-11 15:48:13 -08:00
Alex
534f3ec627 Release v0.22.5 (#2568) 2023-01-11 17:20:05 -06:00
Javier Adriel
9d37c9f743 Move mock k8s functions to one files (#2569) 2023-01-11 13:58:34 -08:00
Javier Adriel
1bad4c3da6 Add KMS UI (#2377)
Adds components to interact with KMS server connected to minio
2023-01-11 10:57:53 -08:00
Alex
9edb579156 Updated vulnerable dependencies (#2567)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-11 12:08:31 -06:00
Javier Adriel
d1aee5d431 Add tenants tests phase 1 (#2566) 2023-01-10 16:11:34 -08:00
Prakash Senthil Vel
dc8d4b4ca1 fix prometheus dashboard values for luxon migration (#2564) 2023-01-10 12:22:45 -06:00
Alex
35ab508109 Updated mds to v0.1.0 (#2563)
- Removed icons from console
- Replaced all icons & loaders in console with mds ones
- Renamed caret  icons
- Removed unused icons
- Replaced colored icons in object browser
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-09 14:35:46 -08:00
Javier Adriel
e01030820c Add tests for tenant logs (#2561) 2023-01-09 11:55:33 -08:00
dependabot[bot]
fab041b364 Bump luxon from 3.2.0 to 3.2.1 in /portal-ui (#2560) 2023-01-09 10:27:05 -08:00
Kaan Kabalak
e5da67d1bc Allow s3:Get* actions in Console (#2559) 2023-01-09 10:42:19 -06:00
Harshavardhana
bbc61930f9 always tidy-up go.mod (#2557) 2023-01-06 09:19:09 -08:00
Daniel Valdivia
40c789e7cb Github Actions v3 (#2556)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-05 21:54:55 -06:00
Alex
6084212bf6 Release v0.22.4 (#2542)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-05 16:23:34 -08:00
Daniel Valdivia
944b56751d Remove GKE Integration (#2552)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-05 17:54:12 -06:00
Pedro Juarez
c9e53542e0 Show the DNS helpbox on tenant edit, as is shown in tenant create (#2545) 2023-01-05 17:37:15 -06:00
Javier Adriel
7001067baa Increase threshold (#2555) 2023-01-05 17:31:32 -06:00
Alex
aece2251cf Migrated moment.js to Luxon (#2540)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-05 15:16:21 -08:00
Javier Adriel
756f0048f0 Add tests for admin info (#2553) 2023-01-05 14:54:00 -08:00
Daniel Valdivia
1cb2fca7a5 Increase coverage (#2551)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-05 14:36:21 -08:00
Kaan Kabalak
287af260b7 Fix Copy URL snackbar styling in Share File modal (#2549) 2023-01-05 14:27:36 -06:00
Daniel Valdivia
9fd76362dc Upgrade Go Dependencies (#2546)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-04 16:44:08 -08:00
Javier Adriel
733517fa76 Fix replication test (#2547)
Before the test was expecting an error while making the request but now the request is successful but it returns a 500 instead, this change will fix it
2023-01-04 15:07:03 -08:00
Daniel Valdivia
d8b3d0715f Change Go version to 1.19 (#2543)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-01-04 13:43:13 -08:00
Javier Adriel
1d951b28aa Allow Put* actions in console (#2544) 2023-01-04 12:51:46 -06:00
Alex
65ab6870e6 Updated mds to v0.0.9 (#2541)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-03 12:46:16 -06:00
Alex
255e3d14d0 Added delete governance bypass option when deleting file versions (#2536)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2023-01-03 10:35:37 -08:00
Javier Adriel
25e486ef18 Fix Operator login when openID provider is configured (#2533) 2023-01-03 10:35:15 -08:00
Alex
92123bd243 Changed selected styles for deleted rows (#2537)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-29 19:57:40 -06:00
Alex
6d5026d17e Update json5 & testcafe (#2538)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-29 17:11:17 -06:00
Prakash Senthil Vel
1e6ca131d9 update route path for idp screens as per menu placement (#2529) 2022-12-27 15:42:44 -06:00
Javier Adriel
21c6a441aa Upgrade jsonwebtoken - vulnerabilities found in current version (#2530) 2022-12-27 12:59:09 -06:00
Pedro Juarez
e23c110057 Run test with ubi 8.7 (#2532) 2022-12-22 14:26:18 -06:00
Kaan Kabalak
de16b73ce8 Capitalize Kubernetes in Login page text (#2526) 2022-12-22 09:49:02 -06:00
Alex
f269d67ec6 Release v0.22.3 (#2525)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-21 15:41:25 -08:00
Alex
7f3490974b First Phase of Luxon migration (#2521)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-21 11:56:05 -06:00
Javier Adriel
a42eef376d Support wildcard list actions (#2520) 2022-12-21 11:55:43 -06:00
Alex
bbf115dc71 Updated Login Front page for Console (#2522)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-21 10:33:05 -06:00
Prakash Senthil Vel
77bcdcfb08 fix crash on add user to group in user details (#2523) 2022-12-20 11:24:54 -06:00
jinapurapu
d713dc4933 Add Helpbox to Tier Type selector screen and adjust formatting (#2519) 2022-12-17 00:03:19 -06:00
Daniel Valdivia
0c9a6bf76b Tidy go.mod file (#2518) 2022-12-16 14:38:15 -06:00
Cesar Celis Hernandez
4c4094420b Ignoring message from MinIO (#2515)
As discussed with @harshavardhana , we should ignore the message on delete in the API. After @poornas changed in PR https://github.com/minio/minio/pull/16221 this message is expected and cannot be considered as an error.
2022-12-16 12:16:19 -08:00
Javier Adriel
96e55ca79b UI changes to IDP screen and remove old sections from settings screen (#2513) 2022-12-16 11:46:35 -08:00
jinapurapu
c61c5024d0 Add hover effect to Tier Type buttons (#2509) 2022-12-16 13:41:39 -06:00
Alex
f61d0a68d5 Implements CONSOLE_DEV_MODE env var (#2517)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-16 13:32:52 -06:00
Javier Adriel
f917f7d167 Remove commented jobs (#2514) 2022-12-16 09:33:12 -08:00
Alex
35541ef323 Fixed Delete all object versions selector functionality (#2516)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-16 11:07:40 -06:00
Daniel Valdivia
1f60d4a808 Tweaks to Menu and Bucket Details (#2512) 2022-12-15 18:45:31 -06:00
Alex
adc199b315 Made improvements to title bar & break points (#2508)
Removed extra margin & changed breakpoints for console / operator pages title bar
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-14 18:13:18 -08:00
Daniel Valdivia
f557c4c550 Split Object Browser and Buckets Admin (#2500)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-14 16:20:13 -08:00
Javier Adriel
0c4a73ff10 Do not regenerate assets for permissions-* tests (#2501) 2022-12-14 13:26:04 -08:00
jinapurapu
203e019e82 Add hover effect to Notification type selector buttons (#2502) 2022-12-14 14:38:34 -06:00
jinapurapu
4d2a39bad2 Added HelpBox to Notification Type Selector screen (#2503) 2022-12-12 22:08:20 -06:00
dependabot[bot]
db4fae3603 Bump d3-color from 2.0.0 to 3.1.0 in /portal-ui (#2504) 2022-12-12 17:51:10 -06:00
Daniel Valdivia
871789a236 Bump UI Dependencies (#2497)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2022-12-12 14:44:51 -08:00
Javier Adriel
ba6fb53594 Increase test threshold (#2499) 2022-12-12 12:38:33 -08:00
Javier Adriel
5d74b21bc4 Reduce test execution times (#2498) 2022-12-12 12:37:53 -08:00
Javier Adriel
006490c753 Add admin subnet tests (#2490) 2022-12-11 23:16:30 -08:00
Daniel Valdivia
1614af0128 Upgrade Go Dependencies (#2496)
Upgraded all dependencies except for Kubernetes packages until we
validate 1.26

Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2022-12-10 10:25:51 -08:00
Daniel Valdivia
27fd91ed37 Release v0.22.2 (#2495)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2022-12-09 16:42:57 -08:00
Alex
7df0560104 Updated mds & fixed blank pages on login (#2494)
- Updates mds to v0.0.7
- Fixed an issue with blank pages during login
- Fixes an issue during logout where path was redirected to
'logout/login'

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-09 14:24:58 -08:00
Javier Adriel
2368199e03 IDP management UI (#2487)
Adds UI to interact with IDP Configurations (CRUD)
2022-12-09 14:13:10 -08:00
Daniel Valdivia
bee98e1ba0 fix: race Condition on Object Browser via Websocket (#2492)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2022-12-09 11:18:19 -08:00
Harshavardhana
8abbbb4625 avoid printing random logs (#2489) 2022-12-08 07:54:21 -08:00
Javier Adriel
ef182fe75e Increase threshold to 54.4 (Current coverage 54.5) (#2488) 2022-12-07 20:01:09 -06:00
Daniel Valdivia
613e93fdc6 Release v0.22.1 (#2486)
Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>
2022-12-06 14:41:25 -08:00
Javier Adriel
a5e3c89a54 Implement handlers for managing IDP (OpenID and LDAP) Configurations (#2485) 2022-12-06 14:33:17 -06:00
jinapurapu
7f55b71495 Add backend tier status checking to all tier types (#2420)
Moves Tier status check to backend for all Tier types.

![Screen Shot 2022-12-02 at 10 37 36
AM](https://user-images.githubusercontent.com/65002498/205370942-e20c0229-77b1-4a7c-9579-eebbd101c4ae.png)
![Screen Shot 2022-12-02 at 10 37 18
AM](https://user-images.githubusercontent.com/65002498/205370943-0d038206-b0e3-4597-9522-b21f94c36c0b.png)

Co-authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-12-06 12:13:14 -08:00
Alex
d95d59e454 Changed Object browser logic to work with websockets (#2419)
fixes https://github.com/minio/console/issues/943

## What does this do?

This allows us to start streaming results to the list instead of waiting
to retrieve all the objects list before sending it to the client

Included a couple of fixes:

- Removed metadata for deleted items
- Fixed multiple metadata requests
- Fixed height grow for parent wrapper
- Fixed object reload after restore version


Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-06 11:23:07 -08:00
Harshavardhana
08ea069ed4 change doc URL if UI is running in k8s (#2484)
Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
2022-12-06 09:53:01 -08:00
Javier Adriel
e7a41b4cd9 Call end_session_endpoint in IDP provider when login out from Console (#2476) 2022-12-05 18:14:41 -06:00
Alex
262a601d21 Release v0.22.0 (#2482)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-02 15:12:59 -08:00
dependabot[bot]
00af6b5179 Bump decode-uri-component from 0.2.0 to 0.2.2 in /portal-ui (#2481)
Bumps
[decode-uri-component](https://github.com/SamVerschueren/decode-uri-component)
from 0.2.0 to 0.2.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/SamVerschueren/decode-uri-component/releases">decode-uri-component's
releases</a>.</em></p>
<blockquote>
<h2>v0.2.2</h2>
<ul>
<li>Prevent overwriting previously decoded tokens  980e0bf</li>
</ul>
<p><a
href="https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2">https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2</a></p>
<h2>v0.2.1</h2>
<ul>
<li>Switch to GitHub workflows  76abc93</li>
<li>Fix issue where decode throws - fixes <a
href="https://github-redirect.dependabot.com/SamVerschueren/decode-uri-component/issues/6">#6</a>
746ca5d</li>
<li>Update license (<a
href="https://github-redirect.dependabot.com/SamVerschueren/decode-uri-component/issues/1">#1</a>)
486d7e2</li>
<li>Tidelift tasks  a650457</li>
<li>Meta tweaks  66e1c28</li>
</ul>
<p><a
href="https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1">https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a0eea469d2"><code>a0eea46</code></a>
0.2.2</li>
<li><a
href="980e0bf09b"><code>980e0bf</code></a>
Prevent overwriting previously decoded tokens</li>
<li><a
href="3c8a373dd4"><code>3c8a373</code></a>
0.2.1</li>
<li><a
href="76abc93978"><code>76abc93</code></a>
Switch to GitHub workflows</li>
<li><a
href="746ca5dcb6"><code>746ca5d</code></a>
Fix issue where decode throws - fixes <a
href="https://github-redirect.dependabot.com/SamVerschueren/decode-uri-component/issues/6">#6</a></li>
<li><a
href="486d7e26d3"><code>486d7e2</code></a>
Update license (<a
href="https://github-redirect.dependabot.com/SamVerschueren/decode-uri-component/issues/1">#1</a>)</li>
<li><a
href="a65045724e"><code>a650457</code></a>
Tidelift tasks</li>
<li><a
href="66e1c2834c"><code>66e1c28</code></a>
Meta tweaks</li>
<li>See full diff in <a
href="https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=decode-uri-component&package-manager=npm_and_yarn&previous-version=0.2.0&new-version=0.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the
default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as
the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as
the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the
default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/minio/console/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-02 12:33:19 -06:00
Aditya Manthramurthy
5800d01406 Bump up madmin-go to v2 (#2479) 2022-12-01 20:55:21 -08:00
Aditya Manthramurthy
c803451920 Separate out dependency vulnerability checks in CI (#2480) 2022-12-01 14:17:46 -06:00
Lenin Alevski
95bdc70d1d Display warning for public access policy in bucket settings (#2473)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-11-23 09:10:14 -08:00
Prakash Senthil Vel
5d10197334 page header ux (#2475)
Closes [#1031](https://github.com/miniohq/engineering/issues/1031)
2022-11-23 09:09:47 -08:00
Prakash Senthil Vel
e7da6cd651 relax editing of endpoint in add site replication UI (#2474) 2022-11-22 09:07:16 -08:00
adfost
0f35369292 fix: incorrect IP and bucket regexes (#2469)
Fixes https://github.com/minio/console/issues/2453.
2022-11-21 13:30:32 -08:00
Daniel Valdivia
579845dfb1 Upgrade Go Dependencies (#2472)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2022-11-21 11:58:14 -08:00
Alex
6ad5c16d3a Fixed logo visibility in Safari (#2470)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-11-18 14:09:00 -06:00
Alex
24176b5c7d Initial Changes to Login page styles (#2467)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-11-18 13:00:08 -06:00
jinapurapu
0b3b5979ba Local bucket creation time (#2464)
<img width="1327" alt="Screen Shot 2022-11-16 at 9 57 57 AM"
src="https://user-images.githubusercontent.com/65002498/202257455-ceb041b0-4db9-44f3-9fd3-cc73c89f4339.png">


Fixes https://github.com/minio/console/issues/2462

Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
2022-11-16 15:40:22 -08:00
jinapurapu
dbec9fbb4a Fix UpdateTierCredentialsModal For MinIO tier (#2459) 2022-11-16 12:00:17 -06:00
Prakash Senthil Vel
7cd0bc7cac update airgap registration steps and instructions (#2463) 2022-11-16 11:36:21 -06:00
Javier Adriel
c12a931dbf Update madmin-go (#2460) 2022-11-15 20:29:36 -06:00
jinapurapu
f8af10dd26 Add permission guidance if User doesn't have permission to view Objects in bucket (#2448) 2022-11-15 19:18:37 -06:00
Alex
4c47b9c3e6 Updated loader utils to avoid ReDoS issue (#2461)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-11-15 18:22:37 -06:00
Alex
44f2fc67a3 Release v0.21.3 (#2458)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-11-15 12:16:09 -08:00
Anis Elleuch
ec1ba16ef7 prom: Fix leak when a call fails with the prometheus endpoint (#2456) 2022-11-15 12:09:58 -06:00
Prakash Senthil Vel
7a5724591a fix crash in ui for empty log entries (#2457) 2022-11-15 12:09:42 -06:00
Alex
9f433bc359 Release v0.21.3 (#2455)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-11-15 07:52:33 -08:00
Javier Adriel
1d45a174ac Add deprecated message in Audit logs section (#2437) 2022-11-14 13:06:55 -06:00
Alex
80cee32031 Fixed Table Action buttons roundness (#2451)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-11-14 12:58:01 -06:00
Prakash Senthil Vel
437cfd0b8e fix broken chart axis data for date time formatting (#2452) 2022-11-14 11:56:17 -06:00
jinapurapu
dc4dae6ddb Added formatting to required permssions in permissionTooltipHelper (#2447) 2022-11-14 09:48:06 -06:00
Alex
2f578010a0 New Menu Adjustments (#2450) 2022-11-13 10:23:55 -08:00
Prakash Senthil Vel
e7ec3fe61f fix sub path resource matching in list objects (#2444)
fixes #https://github.com/minio/console/issues/2400 

Used the policy to validate the fix.

```json

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::sam-card"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws:s3:::sam-card/*"
            ]
        },
        {
            "Effect": "Deny",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws:s3:::sam-card/aa/*"
            ]
        }
    ]
}

```
2022-11-10 11:27:40 -08:00
dilverse
7b389fc323 Add erasure info support (#2446)
Make it easier for user to see backend properties like backend-type,
Standard storage class Parity and Reduced Redundancy storage class
Parity
Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
2022-11-10 09:24:39 -08:00
Daniel Valdivia
86361b630e Tweak some icons to inherit color (#2445)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-11-09 11:05:39 -06:00
Lenin Alevski
c57df87bc3 Add yarn audit check on github actions (#2441)
Checks for known security issues with the installed packages

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-11-08 19:20:47 -08:00
Lenin Alevski
cbbf3c5a53 selective version resolution for load-utils in react-scripts (#2442)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-11-08 13:03:50 -08:00
Daniel Valdivia
8a9fbb461c Release v0.21.2 (#2435)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2022-11-07 21:03:03 -08:00
Alex
55b25cb003 Changed Styles & some routes for console menu (#2428)
Changed styles for menu
Changed Settings page title
Changed Service Account option to be Access Keys
Changed all Service Accounts labels to be Access keys in console

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-11-07 15:32:10 -08:00
Thiago Bittencourt Gil
c929a71649 Removing slash at the end of GCS tier screen endpoint (#2430) 2022-11-07 14:23:50 -08:00
Harshavardhana
8af1bcd35c re-enable TestInspect() test (#2436) 2022-11-07 14:20:57 -08:00
Daniel Valdivia
ae2587dcad Increase STS Session duration to 12 hours (#2434)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-11-07 12:38:29 -08:00
Kaan Kabalak
cac8445aa1 Fix table row width not updating properly (#2433) 2022-11-07 12:13:54 -06:00
Javier Adriel
7eb98035e5 Move tenant logs logic to a new file (#2427)
Going to work and add new code on tenant logs so i make this small
refactor to keep things separated

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-11-04 10:14:56 -06:00
jinapurapu
7c75c87a0c Fixed ListBuckets screen tooltip logic, HelpBox fix (#2404) 2022-11-03 15:57:30 -06:00
jinapurapu
404efd2523 Fixed Users tab permissions to hide if CreateUser only User permission (#2426) 2022-11-03 11:43:19 -06:00
Quentin Dreyer
fc7d60e7ec Remove ADMIN_LIST_TIERS scope in BucketLifecyclePanel (#2384) 2022-11-03 11:35:21 -06:00
Alex
fbf3afd6fb Updated mds to v0.0.3 (#2423)
## What does this do?

Updated mds to v0.0.3

## How does it look?

<img width="1653" alt="Screenshot 2022-11-01 at 19 23 38"
src="https://user-images.githubusercontent.com/33497058/199374216-383023cc-83f7-4825-8b26-63135bd75fdb.png">


Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-11-03 09:58:11 -07:00
Kaan Kabalak
3f8f277841 Fix font size appearing smaller for links on AGPL consent modal (#2425) 2022-11-02 21:43:18 -06:00
Klaus Post
2ff44df636 Add inspection v2 (always encrypted) option. (#2386)
Depends on: https://github.com/minio/minio/pull/15474 for functionality
(which depends on this)

Blocks:  https://github.com/minio/minio/pull/15474

Keep v1 if non-encrypted and decrypt it.

Otherwise if encrypted, use a fixed public key.
2022-11-02 10:35:45 -07:00
Alex
83a612981e Made default EC:4 parity when available without restrictions (#2421)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-10-31 17:52:44 -06:00
jinapurapu
0ae1ace8fe Move tier status logic to backend (#2418) 2022-10-31 13:25:59 -06:00
Alex
a2745c687e Disabled support tools if cluster is not registered. (#2168)
- Redirect to register page when not register vars are set
- Added double column for register page

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-10-28 13:04:30 -07:00
Paco Xu
e5e053a2ad stop using beta.kubernetes.io/os (#2416)
See https://github.com/kubernetes/kubernetes/issues/89477,
https://github.com/kubernetes/kubernetes/issues/89477#issuecomment-603911496.
2022-10-28 11:54:02 -05:00
jinapurapu
a5f89bb6d7 Improve Tier status accessibility (#2409) 2022-10-27 00:19:20 -07:00
jinapurapu
a53b569d0a Add "s3:*Bucket" permission to enable Delete, Create Bucket UI (#2401)
Co-authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
2022-10-26 13:29:55 -07:00
Kaan Kabalak
bcbebda39b Fix Filter box overlapping with header text (#2414) 2022-10-25 22:34:17 -07:00
Harshavardhana
a296850d58 remove cache from configurations tab (#2410)
'cache' is not supported in server deployments
and is not useful to be present in the configurations tab.
2022-10-24 14:16:55 -07:00
Kaan Kabalak
b609a4ee74 Remove extra Println statement (#2412) 2022-10-24 09:30:49 -05:00
Harshavardhana
5409a5eaa0 Release v0.21.1 (#2411)
Signed-off-by: Harshavardhana <harsha@minio.io>
2022-10-24 01:51:06 -07:00
Alex
6959bc5b02 Minimatch dependency update (#2408) 2022-10-21 13:10:06 -05:00
Prakash Senthil Vel
134700b432 fix preview modal title (#2406)
Issue: Long title is causing preview modal to scroll horizontally and
the close button is hidden.

post fix:


![image](https://user-images.githubusercontent.com/23444145/197127950-d6358a43-d795-461b-94da-0d698e987d98.png)
2022-10-21 10:37:38 -07:00
jinapurapu
483d25c3f3 Allow policy with "s3:*Object" to download using Console (#2396) 2022-10-20 20:40:23 -05:00
Alex
dab4eb7664 Fixes to Multiple IDP support in console (#2392)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-10-20 20:08:54 -05:00
Daniel Valdivia
139e90830f Upgrade go.mod dependencies (#2398)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>
2022-10-20 17:26:23 -05:00
Harshavardhana
2e8ad9281d fix: typo in queue-dir and queue-limit for notification targets (#2403)
fixes #2402
2022-10-20 11:55:14 -07:00
Lenin Alevski
6b6cfd10f1 KMS certificates for Encryption configuration page (#2380)
- removed unused console certificate code in frontend
- fixed confirmation dialog not closing after submit form on encryption
page
- simplified kms mtls/ca certificates for tenant encryption
configuration

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-10-19 12:32:08 -07:00
Cesar Celis Hernandez
5f07d45846 Moving away from Nancy (#2393)
`Nancy` test is failing and the issue is recent:
https://github.com/sonatype-nexus-community/nancy/issues/263

Move to more idiomatic https://pkg.go.dev/golang.org/x/vuln/vulncheck
2022-10-19 00:07:42 -07:00
Cesar Celis Hernandez
2dd92fd940 Removing old cache spot for permission test and incrementing the timeout. (#2395) 2022-10-18 21:28:43 -05:00
Anis Elleuch
40f64709a6 Skip TLS verif for local address (#2323)
Since the console is talking locally to MinIO, skip the TLS verification 
if any.

This will allow users to avoid defining the correct MINIO_SERVER_URL
domain address, when TLS is enabled, is useful in a bare-metal setup.
2022-10-17 12:34:05 -07:00
Alex
c31b311b4e Release v0.21.0 (#2389)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-10-14 21:30:21 -07:00
Aditya Manthramurthy
c316532fe9 fix: crosscompile windows build (#2391)
This is an attempt to fix the windows CI build issue.

The regression is appears to have been introduced in
d2d735c5c0
2022-10-14 21:29:36 -07:00
Aditya Manthramurthy
a65d6ba8f1 Add Role ARN as part of OIDC provider (#2382)
RoleARN needs to be used in the STS API call when present. 
Code to use this value needs to be added.
2022-10-14 15:46:25 -07:00
Kaan Kabalak
11f5d6aa0d Update Policy Summary once Raw Policy form is submitted (#2387) 2022-10-14 11:46:55 -05:00
jinapurapu
9532aa9500 Fixed handling of nil usage in getUsageWidgetsForDeployment (#2378) 2022-10-13 22:05:59 -05:00
Prakash Senthil Vel
ec3deed38e Site replication support for different accesskey and secretkey in different sites (#2350) 2022-10-13 17:11:29 -07:00
Alex
38015b4913 Updated golang.org/x/text dependency on console (#2381) 2022-10-13 16:10:16 -07:00
Cesar Celis Hernandez
e5508b5c5d Fix permission tests (#2379)
### Objective:

To fix Permission Tests

### Issue:

```
Cannot find module 'minio' or its corresponding type declarations.
```

### Solution:

To create the `assets` if there is no cache hit.

```sh
make assets
```

### Additional Information:

Update the version of the action.
2022-10-13 11:51:09 -07:00
Javier Adriel
9587e4105f Add missing KMS handlers for version, apis and metrics (#2376) 2022-10-12 12:00:48 -07:00
Harshavardhana
d2d735c5c0 upgrade all deps and keep go1.18 minimum (#2372) 2022-10-11 15:02:43 -07:00
Javier Adriel
915c10b4b8 Add kms to list of enable features if available (#2373) 2022-10-11 15:02:31 -07:00
Cesar Celis Hernandez
671530f5b4 Go back to Github runners while Datacenter is prepared (#2375) 2022-10-11 16:35:12 -05:00
Daniel Valdivia
0c778f57d3 Add Server Metrics Info Tab (#2340) 2022-10-07 21:19:40 -07:00
Cesar Celis Hernandez
43db7729c4 Splitting Operator UI Tests for faster execution (#2366) 2022-10-07 15:42:44 -05:00
jinapurapu
48b467a683 Added permission tooltips, UI and text improvements for Policies screens (#2368) 2022-10-07 12:58:08 -05:00
Javier Adriel
59b7406dd7 Implement KMS handlers (#2367) 2022-10-07 10:50:17 -07:00
Lenin Alevski
9e7a40abc8 Add support for manual edit of KES configuration file (#2354)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-10-07 10:15:56 -05:00
Cesar Celis Hernandez
189331f465 Set timeout in all permission tests (#2369) 2022-10-07 00:18:52 -07:00
jinapurapu
e6a2364209 Added tooltips, button permission UI, for Groups, GroupDetails screens (#2353) 2022-10-06 22:53:31 -05:00
Alex
2b17aa598f Added basename & location origin to logout button (#2370)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-10-06 22:48:13 -05:00
jinapurapu
f10fdf4610 Show Tiers status (#2291)
closes https://github.com/miniohq/engineering/issues/681

Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
2022-10-06 18:11:28 -07:00
Alex
4156fe0666 Removed position fixed to tenant size preview (#2364)
## What does this do?

Removed position fixed to tenant size preview to avoid overlap of create
buttons

## How does it look?
<img width="1698" alt="Screen Shot 2022-10-05 at 22 15 12"
src="https://user-images.githubusercontent.com/33497058/194206392-62718458-7417-4a01-a2e0-219d22a25483.png">



Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-10-06 00:55:18 -05:00
Alex
89bef6027c Fixed edit yaml buttons position (#2363)
## What does this do?

Fixes the position of save buttons in edit tenant YAML screen

## How does it look?
<img width="1442" alt="Screen Shot 2022-10-05 at 21 48 08"
src="https://user-images.githubusercontent.com/33497058/194203074-cd363ff4-02fd-4f60-ab52-6daca1d0fab5.png">


Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-10-05 22:16:42 -05:00
jinapurapu
333ca0a827 Permissions Tooltip guidance for ListUsers and UserDetails screens (#2347) 2022-10-05 18:34:31 -05:00
Cesar Celis Hernandez
de82a056e6 Improve Permissions Tests Part 1 (#2359)
### Objective:

To fix `Permissions Tests Part 1 (1.18.x, ubuntu-latest)`

### Strategy:

To make test more reliable, it has been isolated in folder `A` and `B`,
letting other tests to properly pass. And if new failure is observed, it
will be either in folder `A` or `B` for `iamPolicies.ts` and
`bucketWritePrefixOnly.ts` respectively.

### Root cause:

`iamPolicies.ts` and `bucketWritePrefixOnly.ts` are not stable tests
when running together with other tests, some sort of racing condition
that can be improved by isolating them.

### All tests are passing, same code:

<img width="435" alt="Screen Shot 2022-10-05 at 5 48 54 PM"
src="https://user-images.githubusercontent.com/6667358/194170348-cdba42ca-08a0-4db4-9543-f2f682ba6603.png">
2022-10-05 18:33:43 -05:00
Daniel Valdivia
a01b1ffe8c Update Favicon (#2360)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-10-05 14:31:55 -07:00
jinapurapu
61718a5915 Size handling for CounterCard long value (#2345)
Avoids overlap of counterValue text and Browse button.
![Screen Shot 2022-09-30 at 10 42 41
AM](https://user-images.githubusercontent.com/65002498/193326883-9379f6de-73c7-4fee-a5e5-0e50bd052359.png)

Co-authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-10-04 15:10:59 -07:00
Prakash Senthil Vel
2fed3572b2 License page updates (#2356)
How does it look:


![image](https://user-images.githubusercontent.com/23444145/193804863-3e3e7207-3284-4be9-bb49-de38a58f744c.png)

Fixes #https://github.com/miniohq/engineering/issues/983

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-10-04 14:57:20 -07:00
jinapurapu
af9e4fc150 Fixes for Permission tests (#2351)
Updates location of Policies screen, adds required policies to testing
profiles

Authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
2022-10-04 13:56:28 -07:00
Harshavardhana
f8475af5a6 do not log random errors using Go logger (#2355)
we need to make sure that we print in consistent
format for the logs, remove the unnecessary logs
everywhere used via `log.Print*`
2022-10-04 10:39:28 -07:00
Harshavardhana
413870e995 update madmin-go and mc deps for new changes (#2352) 2022-10-02 23:04:34 -07:00
Daniel Valdivia
cdd6f272ed Release v0.20.5 (#2349)
Signed-off-by: Daniel Valdivia
<18384552+dvaldivia@users.noreply.github.com>

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-09-30 01:51:41 -07:00
jinapurapu
5eddd0cd8d Permission Error handling and Tooltips for upload file, object action buttons (#2338)
![Screen Shot 2022-09-26 at 11 51 34
AM](https://user-images.githubusercontent.com/65002498/192357633-2f551441-8c27-450e-873e-1766d388cdb0.png)

<img width="706" alt="Screen Shot 2022-09-23 at 11 38 59 AM"
src="https://user-images.githubusercontent.com/65002498/192035299-093f814e-4821-4610-8fc5-c20565ea7c38.png">
<img width="642" alt="Screen Shot 2022-09-23 at 11 47 15 AM"
src="https://user-images.githubusercontent.com/65002498/192036512-f8891625-e050-42fd-9c43-173dd61c4df3.png">
2022-09-30 00:17:42 -07:00
Harshavardhana
5cf2b736e1 ignore configs with no KVs and simplify config builder (#2342)
convert all \n to ','
2022-09-30 00:16:47 -07:00
Daniel Valdivia
55330960e9 Move Access to Policies under Identity (#2348)
Signed-off-by: Daniel Valdivia
2022-09-29 22:55:21 -05:00
Lenin Alevski
a3b88567cc Add support for edit/add/remove environment variables to MinIO tenant (#2331)
![image](https://user-images.githubusercontent.com/1795553/191574784-69d55ca6-0a8c-41f3-b7f5-8526854cc8d2.png)


Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-09-29 20:50:35 -07:00
Daniel Valdivia
73a687376a Fix IDP not having same salt/passphrase across pods (#2346)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-09-29 15:44:17 -07:00
jinapurapu
de4c08c2ff Fixed overhanging Browse button on Bucket card (#2343) 2022-09-29 14:14:31 -05:00
Harshavardhana
9396df2e20 remove unnecessary trace and threads profiling (#2341) 2022-09-28 14:32:14 -05:00
Alex
4143f50004 Release v0.20.4 (#2337)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-09-27 21:10:42 -07:00
Alex
d1511c5eb0 Limit concurrent downloads & uploads (#2313) 2022-09-23 10:35:55 -07:00
jinapurapu
c4c6d48abf Tooltips for Bucket Lifecycle, Delete bucket, Manage bucket (#2334) 2022-09-23 12:30:37 -05:00
Alex
43c5f9094a Tenant details navigation issues fix (#2336)
Fixes issues with Tenant details page navigation

- Back issue between tenant summary & tenants list page
- Not show the selected tab correctly on tenant details after clicking
back on browser's back button

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-09-23 12:30:18 -05:00
Javier Adriel
51ab9c59ae Update minio/pkg v1.4.0 (#2335) 2022-09-23 12:08:24 -05:00
Aditya Manthramurthy
fc95ab8658 Fix oauth state generation for OIDC login (#2333)
This is a regression from 118cf97e1d when
env var support for passing console configuration from MinIO was
removed.

This change ensures that all MinIO nodes in a cluster are able to verify
state tokens generated by other nodes in the cluster. Without this, it
is necessary to use sticky sessions in a loadbalancer to ensure that
OIDC authorization code login flow steps for a client happens on the
same minio node.

Fixes https://github.com/minio/minio/issues/15527
2022-09-23 10:30:45 -05:00
Daryl White
bebe860903 Updating documentation links to new URLs (#2325)
The new doc site has launched, and all docs have new URLs.
This PR updates the documentation URLs in the Console to point to the
new locations.
2022-09-22 22:37:32 -07:00
Kaan Kabalak
df4679ea55 Fix styling for Create New Path button in Buckets page (#2330)
Fixes #2329
2022-09-21 19:11:58 -05:00
Alex
2263eada70 Release v0.20.3 (#2328)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-09-20 23:54:10 -07:00
Lenin Alevski
368c9ee3d7 InputBoxWrapper automatically add hide/show behavior for password fields (#2327)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-09-20 23:13:34 -05:00
jinapurapu
3513a01711 Add Bucket tooltip improvements (#2326) 2022-09-20 19:12:18 -07:00
Lenin Alevski
0af36a5757 Add: Allow to configure env variables during tenant creation (#2322)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-09-20 18:58:31 -05:00
Daniel Valdivia
fdd5a94074 Fix NPE on Operator Login with SSO (#2324)
Signed-off-by: Daniel Valdivia
2022-09-20 18:57:48 -05:00
Javier Adriel
17ad2cfd14 Add dummy endpoints for kms integration (#2301)
Add dummy endpoints for kms integration

Implementation will come in another PR
2022-09-20 16:09:30 -07:00
Daniel Valdivia
67f509e2bb Release v0.20.2 (#2321)
Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>
2022-09-16 16:02:12 -07:00
Benjamin Marte
6102094c9e Adds a logout view which enables minio to logout when using OIDC (#2281)
* added logout view
* Fixed issues that arose after merging with master
* removed unused navigate and merged with master
* changes based on review feedback
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-09-16 14:21:58 -07:00
Lenin Alevski
d84062b1b2 Fix: Labels for Node Selector in Pod Placement (#2320)
Enabling/disabling buttons correctly in pod placement > labels to be
consistent with all other screens in the application

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-09-16 13:24:45 -07:00
jinapurapu
a878440485 Added permissions guidance on ListBuckets and AddBuckets screens (#2319)
Added helpbox and tooltip guidance on ListBucketsand AddBuckets screens
Added bucketname to resource checking for bucket level config permissions
2022-09-16 13:22:20 -07:00
Kaan Kabalak
cd6e61e93b Don't show Bucket Name input error until field is touched (#2316) 2022-09-16 13:48:02 -05:00
jinapurapu
a77b56b522 Toggle Bucket Naming Rules display by clicking text (#2311) 2022-09-16 13:12:47 -05:00
Cesar Celis Hernandez
6ed5084691 To add missing file for coverage (#2318) 2022-09-15 19:36:00 -05:00
Daniel Valdivia
4ac6ecb558 Return 401 for Login Errors (#2312)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-09-15 15:33:53 -05:00
Alex
41671b4f25 Fixed crash in simple dashboard when one disk has failed (#2314)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-09-15 14:26:00 -05:00
jinapurapu
024ab1212b Add Minio tier type (#2302) 2022-09-15 14:00:39 -05:00
jinapurapu
77f62e11ef Tiers permission UI fix (#2310) 2022-09-15 11:36:30 -05:00
Cesar Celis Hernandez
0960835cd9 To migrate all testcafe (#2309) 2022-09-14 12:22:27 -07:00
Cesar Celis Hernandez
3746dd47f8 To migrate Permissions Tests Part 1 test (#2299)
migrate all-permissions-1
2022-09-12 20:59:33 -04:00
Cesar Celis Hernandez
ce255c5181 To migrate site replication test (#2276)
Migrate site replication test
2022-09-12 20:01:24 -04:00
Alex
7728cc734a Inherits error props to tooltip wrapper child buttons (#2307) 2022-09-11 23:29:30 -07:00
Lenin Alevski
cc581c6a9e fix: login function was returning fixed error (#2308) 2022-09-11 23:28:07 -07:00
Alex
f7b142e74a Replacing all buttons from console with mds (#2303)
Replaces buttons in console to start using MinIO Design System (mds)

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-09-09 17:42:30 -05:00
Harshavardhana
1108cee626 do not add preceding '/' for putRequests (#2306) 2022-09-09 15:33:58 -05:00
Javier Adriel
94fdba5990 Run lint in missing files (#2300) 2022-09-08 11:13:22 -05:00
Cesar Celis Hernandez
524258a9ea To migrate react warning test (#2273) 2022-09-06 17:49:45 -05:00
Alex
c0cf7a6d6a Release v0.20.1 (#2298)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-09-06 14:15:33 -07:00
Daniel Valdivia
f9916d1cd6 Update Site Replication Documentation link (#2297)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-09-06 12:39:14 -05:00
Cesar Celis Hernandez
52512c0ccc To repair the Operator API Tests & Operator UI Tests (#2292) 2022-09-06 09:19:31 -07:00
Lenin Alevski
989f041658 Support for providing Tenant client certificates (#2294) 2022-09-06 10:20:16 -05:00
Cesar Celis Hernandez
2f81b750a3 To repair SSO test (#2295) 2022-09-06 00:12:16 -07:00
Kaan Kabalak
035a5b88c2 Add support for Multiple IDPs on Login screen (#2258) 2022-09-03 11:02:48 -05:00
Alex
7702149962 Added missing prefix for downloads (#2286)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-09-03 10:01:45 -05:00
Alex
f3e24d62ca Fixed Visual height for Sites Replication (#2293) 2022-09-03 01:27:33 -05:00
jinapurapu
d663b9f346 Display configured logger_webhook endpoints (#2279) 2022-09-01 15:23:55 -05:00
Harshavardhana
ae147358b1 upgrade minio-go/v7 v7.0.35 (#2288)
changes LDAP/SSO to send login via
form body instead of query params
2022-08-31 21:59:40 -07:00
Alex
20bc53119e Filtered prefixes in versions list (#2285)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-30 18:28:16 -05:00
jinapurapu
3a3a4b2fea Interactive Bucket Naming Rules component (#2262) 2022-08-30 13:02:10 -05:00
Alex
497437729b Select User & Groups Policy modal updates (#2284)
Select User Policy modal updates

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-30 12:06:59 -05:00
Harshavardhana
1c37fcf398 update UBI base image to 8.6 2022-08-29 23:48:28 -07:00
Cesar Celis Hernandez
67af66fc55 Format all files after swagger-gen (#2283) 2022-08-29 22:53:50 -05:00
Cesar Celis Hernandez
288c843a17 Catch error in gofmt (#2266) 2022-08-29 19:28:39 -05:00
Cesar Celis Hernandez
9357c2db0e Formatting missing areas with gofmt (#2278)
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-08-29 18:04:09 -04:00
Lenin Alevski
139771f4d4 Fixes and improvements for Tenant Security page (#2252)
- Tenant securityContext was only being applied to first pool
- Fixed style issues on tenant security page to be more consistent
- Added missing FsGroupChangePolicy in the SecurityContextSelector
  component

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-08-29 15:35:23 -05:00
Alex
b7783aaa1c Removed double border in raw policy / yaml containers (#2277)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-26 18:41:28 -05:00
Ashish Kumar Sinha
9821beb1de read license from envt variable (#2259) 2022-08-26 18:09:15 -05:00
Cesar Celis Hernandez
d279f722f8 Migrate reuse golang dependencies (#2275) 2022-08-26 16:57:27 -05:00
Cesar Celis Hernandez
9539a8e18a Migrate semgrep to datacenter (#2271) 2022-08-26 15:30:33 -05:00
Alex
f11b9bff17 Improved policy create policy screen (#2268)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-26 13:07:42 -05:00
Aditya Manthramurthy
06c282dd9a Fix config parsing bug with updated madmin helper (#2264) 2022-08-25 10:45:07 -07:00
Cesar Celis Hernandez
3e9fb853d9 Correct gofmt version 1.19 (#2267) 2022-08-25 11:44:55 -05:00
Alex
cd21ad2085 Fixed erratic behavior in configuration pages (#2269)
- Issue with fields being cleared in forms with CSV component present
- Load configuration panels on section change

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-25 09:22:05 -05:00
Cesar Celis Hernandez
729100ae16 Execute Lint Job with Self Hosted Runner (#2265) 2022-08-24 22:09:07 -05:00
Cesar Celis Hernandez
bcd29a4232 Migrate vulnerable-dependencies-checks to datacenter (#2263) 2022-08-24 19:34:16 -05:00
Minio Trusted
380a9d7faa update go mod tidy
Signed-off-by: Harshavardhana <harsha@minio.io>
2022-08-22 23:59:23 -07:00
Alex
9cd0033504 Release v0.20.0 (#2261)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-22 23:27:22 -07:00
Aditya Manthramurthy
483fe77a35 Fix config parsing using updated method (#2251)
Fix config parsing using madmin and mc bump up

- The config parsing client-side logic is updated in madmin-go

- This change also has fixes associated with breakage caused by bumping
up the mc dependency
2022-08-23 00:27:26 -05:00
jinapurapu
1742303ad7 Changed timestamp to date format in widgets CSV download (#2253) 2022-08-22 10:34:49 -05:00
jinapurapu
292fb3920f Created button to download Widget data as CSV or PNG file (#2241) 2022-08-19 12:48:15 -05:00
Javier Adriel
9ed8f11b22 Change register tabs (#2250)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-08-17 18:32:10 -05:00
Prakash Senthil Vel
860d8c6b78 UI to delete configured notification targets (#2213) 2022-08-17 15:40:37 -05:00
Alex
99965805a6 Reimplemented DirectPV API in operator console (#2207)
- Updated API to use latest directpv library

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-17 13:05:07 -05:00
Alex
7036d1328e Added Color customization to embedded object browser (#2246)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-17 11:06:10 -05:00
Lenin Alevski
697910c7b2 fix: buckets browse button was not clickable (#2249)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-08-16 18:23:48 -05:00
Kaan Kabalak
64dc605843 Fix inconsistencies in Health Diagnostics UI (#2239) 2022-08-12 22:45:08 -05:00
jinapurapu
75fa88e6e2 Added delay to Audit Log tests to reduce failure (#2245) 2022-08-12 22:44:27 -05:00
Alex
2857b8c586 Release v0.19.5 (#2243) 2022-08-10 20:43:36 -07:00
Alex
b1788c29db Disabled Object Locking button when permissions are not set (#2226)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-10 22:15:18 -05:00
jinapurapu
2e1401f013 Increased delay to reduce failure of Operator UI test (#2240) 2022-08-10 16:12:55 -05:00
Alex
1e1c11b13c Added FSGroupChangePolicy support to create tenant screen (#2233)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-10 13:28:15 -05:00
Javier Adriel
25c1c854b1 Add new section to register tenants with API key in operator (#2222) 2022-08-09 13:23:15 -05:00
Javier Adriel
5be2cc1965 Implement register handlers (#2219) 2022-08-09 13:22:53 -05:00
Alex
4aa3f40792 Removed permanent scrollbar in embedded object browser (#2237)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-09 12:02:09 -05:00
jinapurapu
3f41a82fd3 Image field fix (#2231) 2022-08-09 11:04:43 -05:00
Harshavardhana
1b641b4222 return bad request instead of 403's (#2229)
S3 API requests '403' as valid error
in some situations when client is probing
the server for valid S3 endpoint.

return '400 Bad Request' instead.
2022-08-08 15:37:01 -05:00
jinapurapu
85aabebbb4 Added text to AddBuckets Helpbox advising to enable versioning to enable retention (#2235)
Added hepbox guidance text to enable versioning in order to set retention on bucket creation
2022-08-08 14:08:08 -05:00
Pedro Juarez
919232261d switch to node version specified in .nvmrc file (#2225) 2022-08-05 17:54:47 -07:00
Harshavardhana
ddd25a20eb update CREDITS and enable builds for go1.19 (#2227) 2022-08-05 10:07:38 -05:00
Harshavardhana
84b8f9d6fa support P-384, P-512 constant time implementations (#2224)
fixes #2223
2022-08-04 15:36:38 -07:00
jinapurapu
46af0ff74c Protocol Logos for Add Tenant - Identity Provider (#2210) 2022-08-04 09:14:38 -07:00
Javier Adriel
b3651ed0a3 Auto register API key once it is retrieved from subnet (#2217) 2022-08-03 09:43:22 -07:00
Alex
78c4fa393a Changed x axis notation to display date indicator in zoom mode (#2221)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-02 22:23:27 -07:00
Kaan Kabalak
84c4159062 Fix anchors and update links for License page features (#2220) 2022-08-02 20:30:16 -05:00
Javier Adriel
ac2888fc4e Implement login and api key handlers (#2204) 2022-08-02 10:41:12 -05:00
Alex
c311847dcf Changed wrong button structure un buckets list page (#2218)
Also fixed issue with tests part 3 workflow

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-01 22:04:51 -05:00
Harshavardhana
cb6cda7265 fix: crash in operator console for missing fsGroup (#2211)
Bonus: Add support for "fsGroupChangePolicy"
Bonus: keep only github actions in workflow folder
2022-08-01 19:04:00 -07:00
Cesar Celis Hernandez
16fd5470db Correcting response on invalid login attempt (#2216)
Verifying detailed message error from bad login in SSO Test
2022-08-01 18:12:39 -05:00
jiuker
ea0cac2a92 fix:Incorrect template (#2196)
The formatting template is incorrectly formatted.
2022-08-01 17:44:35 -05:00
Alex
33b041ef34 Fixed incompatibility with some base64 strings & React Router v6 (#2208)
* Fixed incompatibility with some base64 strings & React Router v6

This affected Object Browser & certain Cyrillic / Chinese names

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-01 15:15:03 -05:00
Garen Chan
b692ea693f Fix error: setMultiBucketReplication healthCheckPeriod not work (#2212) 2022-08-01 13:12:54 -07:00
Cesar Celis Hernandez
fd39e50c08 Updating SSO Error Message on bad login (#2215)
Updating error message on bad sso login
2022-08-01 14:09:07 -05:00
Alex
ad4b9c050a Added DirectPV mode to Operator console (#2203)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-08-01 12:57:31 -05:00
Alex
1deb6371ed Release v0.19.4 (#2209)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-07-29 13:12:41 -07:00
Aditya Manthramurthy
3b11556f4b Fix build after swagger codegen (#2201) 2022-07-28 13:20:16 -07:00
Lenin Alevski
25f719b0e2 TLS Certificates help box and small bug fixes (#2206)
- Added TLSHelpBox component
- fix: Use the right `add` icon component in the security tab to be consistent
- fix: Add/Remove additional certificates button for custom certificates
- fix: Add/Remove additional users button for built-in IDP

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-07-28 14:18:28 -05:00
Alex
231b63f1b0 Added duration param to speedtest (#2205) 2022-07-27 21:00:54 -05:00
Javier Adriel
e73370cc8c Add dummy subnet handlers (#2198) 2022-07-27 16:34:19 -07:00
Javier Adriel
5d25dd4c06 Improve marketplace test coverage (#2202)
* Improve marketplace test coverage

* gofumpt
2022-07-27 16:33:56 -07:00
Kaan Kabalak
51a8bacc18 Implement WebSockets for Profile download (#2190) 2022-07-26 18:40:24 -07:00
Harshavardhana
db07f546a4 Release v0.19.3
Signed-off-by: Harshavardhana <harsha@minio.io>
2022-07-24 09:51:03 -07:00
Harshavardhana
255cf0bc85 fix: hard regression in console login from v0.19.2 release
fixes #2197
2022-07-24 09:41:55 -07:00
Harshavardhana
733e0b18e2 make sure build works for now 2022-07-22 22:47:08 -07:00
Daniel Valdivia
8d90e03992 Release v0.19.2 (#2194)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-07-22 22:15:03 -07:00
Cesar Celis Hernandez
1a1fae9ce3 Use intended console code in compiled MinIO (#2193) 2022-07-22 22:14:46 -07:00
Alex
f26786c904 Fixed Tiers load when information from tierStats is not available (#2191)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-07-22 12:40:38 -07:00
Javier Adriel
e0b6bf5aa6 Register api key section (#2180)
Split register section in tabs
Add register API key section
2022-07-22 11:27:53 -07:00
Daniel Valdivia
9655fc4490 Fix operator login not showing error (#2185)
* Fix operator login not showing error

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* Fix Test

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-07-22 12:21:25 -05:00
dependabot[bot]
417ea4d481 Bump terser from 5.14.0 to 5.14.2 in /portal-ui (#2187)
Bumps [terser](https://github.com/terser/terser) from 5.14.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 11:57:54 -05:00
Daniel Valdivia
5a59f8e3f4 iFrame Header when embedding (#2189)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-07-22 00:03:52 -07:00
jinapurapu
48340d0010 Fixed jumpy switch for Proxy configuration on Register screen (#2186) 2022-07-21 19:12:01 -05:00
Lenin Alevski
251de9fe8a Add support for adding LDAP admins based on user/group DNs (#2178)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-07-20 18:27:11 -07:00
Javier Adriel
c501df927b Split register section in tabs (#2176) 2022-07-20 18:26:43 -07:00
Daniel Valdivia
cdb1659506 Fix redirect to login base url. (#2182)
No longer needed due to baseUrl in the react router
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-07-20 16:23:24 -07:00
Lenin Alevski
558afe36ad Various fixes for Tenant details page (#2181)
- fixed refresh tenant details page after changing Domains and updating
  image
- Relax tenant domains to allow including port number

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-07-20 11:55:19 -05:00
Alex
712d3870eb Fixed storage class selectors for add & edit pool wizards (#2183)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-07-20 10:11:56 -05:00
NaccOll
c71f084531 feat: subpath support using reverse proxy (#2174) 2022-07-19 19:32:20 -07:00
jinapurapu
1c58a543b6 Monitoring and Audit Log config screen UI tests (#2179) 2022-07-19 19:10:21 -05:00
Alex
8e857dc563 Updated security issue with glob-parent dependency (#2177)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-07-18 19:00:48 -05:00
Javier Adriel
78d4d4c89e Add endpoint to get api key from subnet (#2175) 2022-07-18 17:51:07 -05:00
Alex
aea749d82f Added Loader in rewind enable function (#2172)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-07-18 15:39:14 -05:00
jinapurapu
ce3293b4e2 Added Testcafe test for Audit Logging text fields (#2173)
Added Testcafe test for Audit Logging text fields, fixed bug in setting serviceAccount
2022-07-15 17:06:33 -05:00
jinapurapu
0c12fbdd23 Tenant Monitoring Screen TestCafe UI tests (#2161) 2022-07-15 14:06:48 -05:00
Aditya Manthramurthy
118cf97e1d Allow multiple IDPs config to be passed via struct (#2167)
* Allow multiple IDPs config to be passed via struct

* This removes support for ENV based IDP configuration for console

* Ensure default scopes are used if none are given

* Add display name field for provider config
2022-07-14 07:27:45 -07:00
jinapurapu
abb668633b Added bucket naming rules to Add Bucket help text (#2171) 2022-07-13 14:05:37 -07:00
jinapurapu
dd2fffd3dc Tenant security context component (#2139)
Added edit Security Context component to Tenant Security screen, and updated API and backend to enable editing
2022-07-13 14:05:07 -07:00
Harshavardhana
64b13e9dc9 Remove pkg.MPSECRET unused value 2022-07-12 13:59:36 -07:00
Alex
58d7f1e8ae Release v0.19.1 (#2169)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-07-12 13:51:11 -07:00
dependabot[bot]
45e4a94416 Bump moment from 2.29.3 to 2.29.4 in /portal-ui (#2164)
Bumps [moment](https://github.com/moment/moment) from 2.29.3 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.3...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 14:53:04 -05:00
jinapurapu
cce054bbe8 Create security context component and add to edit Prometheus Monitoring (#2115) 2022-07-07 14:52:30 -05:00
Alex
cf0e326b82 Object Browser only mode (#2157)
- Added flag CONSOLE_OBJECT_BROWSER_ONLY=on to trigger between console mode & Object Browser only
- Hidden not necessary buttons for object browse
- STS Login

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-07-07 12:28:25 -07:00
Javier Adriel
e48958f5a0 Connect marketplace API to microservice (#2130) 2022-07-06 23:11:23 -05:00
Klaus Post
63e2793272 Update trace response and dependencies (#2141) 2022-07-05 13:36:12 -07:00
Prakash Senthil Vel
532e64b802 UI AGPL license consent (#2154) 2022-07-05 09:17:51 -07:00
Alex
64b3e965c6 Change Support menu positon (#2160)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-07-05 11:08:18 -05:00
Alex
9371c027f3 Added Prettier test to workflow (#2159)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-06-30 23:40:23 -05:00
jinapurapu
a8bc58a420 Add Audit Log and Log DB security context selector and split screen into tabs (#2156)
* Added security context selector for logging and log DB to Audit Log screen, split Audit Log screen into tabs
* Cleaned up tab titles, disabled Save button while loading
2022-06-30 14:28:08 -07:00
Javier Adriel
10c56a91da Check if user is in EU (#2143) 2022-06-30 14:27:36 -07:00
Javier Adriel
403972de39 Select not working without dispatch (#2152) 2022-06-29 19:02:38 -05:00
Paweł Kuffel
1c0632473a Add object-level error message display in Downloads/Uploads panel (#2150) 2022-06-29 08:26:22 -07:00
Harshavardhana
ff93109b57 simplify and optimize deleting multiple versions of object (#2153) 2022-06-28 20:25:50 -07:00
Cesar Celis Hernandez
b518810106 Avoid the crash in the test (#2147) 2022-06-24 18:51:52 -05:00
Prakash Senthil Vel
b4d2d65c5c UX Top bar height (#2146) 2022-06-24 10:25:30 -07:00
Alex
beeb188d7e Fixed issues in Replication rules screens (#2145) 2022-06-23 21:35:50 -07:00
jinapurapu
2830022ede Tenant log config screen (#2142)
* Created file for auditLogsScreen, connected to link in TenantDetails Audit Log tab
* Fixed input title formatting, confirmation modal logic
2022-06-23 16:43:23 -07:00
Javier Adriel
ba4103e03f Prompt email after login (#2108)
* Add new route to marketplace modal
* Add redux logic for showing and displaying marketplace modal
* Redirect to marketplace view if console is in operator and marketplace mode
* Add marketplace component
* Use navigate instead of redirect
2022-06-23 12:22:38 -07:00
Alex
f3d6638384 Added improvements to Rename modal in windows (#2140)
- Disabled button when filename is less than 200 characters long
- Selector to override & accept long name
- Added this behavior when one file is checked in objects list

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-06-23 10:17:52 -05:00
Alex
2ad42d660b Added Rename modal for filenames longer than 200 characters in Windows (#2137)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-06-22 12:43:57 -05:00
Cesar Celis Hernandez
618a00d775 Improving our Operator Test in console (#2138) 2022-06-22 11:07:40 -05:00
jinapurapu
d0b65ce297 Single screen to display and edit Prometheus monitoring configuration (#2134)
* Created new screen to display and edit Prometheus monitoring configuration
* Updated image name validation to include slash and colon
* Removed unused files
2022-06-21 09:39:32 -07:00
Cesar Celis Hernandez
41f640077b Delete Tenant Test (#2098) 2022-06-20 15:24:44 -07:00
Cesar Celis Hernandez
bfa05616b1 Wait until resource exist to wait on it (#2136) 2022-06-20 14:48:54 -07:00
Javier Adriel
f792d7a476 Remove unused deps (#2133) 2022-06-16 19:32:27 -07:00
jinapurapu
9b13cfdbe9 User Assign Policy UI test (#2129) 2022-06-16 14:43:08 -05:00
Cesar Celis Hernandez
02c274e117 Relaxing tests when play is down (#2131) 2022-06-16 08:49:53 -07:00
Daniel Valdivia
8993b40730 Release v0.19.0 (#2125)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-15 18:18:36 -07:00
Prakash Senthil Vel
1311b171f9 UX menu toggle and license badge icon (#2127) 2022-06-15 16:54:13 -07:00
Alex
7ecc1022b2 Added decimal support to bucket quota selectors (#2126)
- Fixed an issue with calculateBytes function
- Fixed add bucket validation form

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-06-15 16:35:47 -07:00
Javier Adriel
a5c14790b3 Fix describe test (#2128) 2022-06-15 14:58:35 -05:00
Javier Adriel
e5f7a03585 Remove unused code in marketplace API (#2124) 2022-06-15 09:21:59 -07:00
jinapurapu
a024a13f25 Policy selector fix (#2123) 2022-06-14 12:18:41 -05:00
Alex
4d876d0ce8 Remove of unused history props (#2122)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-06-13 16:40:58 -07:00
Javier Adriel
b02c37bf33 Remove history library (#2119)
* Use navigate instead of push
* Remove use navigate
* Remove import
* Remove history
2022-06-13 16:16:43 -07:00
Daniel Valdivia
1d17f11d2f Update AddUserScreen layout to fix padding (#2121)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-13 13:29:21 -05:00
Lenin Alevski
1dd9f7f363 Adding missing init container fields for Prometheus and Logsearch(Audit) UI (#2116)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-06-11 20:20:57 -07:00
Cesar Celis Hernandez
618d95b76e Reduce renders in password when adding a user (#2120) 2022-06-11 18:09:55 -07:00
Daniel Valdivia
e416abe19b Updates to License page and Menu (#2118)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-10 20:11:33 -07:00
Javier Adriel
296f58f43d Use appDispatch instead (#2114) 2022-06-10 14:33:17 -07:00
Daniel Valdivia
0b5e3d5a10 Metrics tweaks for free space (#2113)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-10 13:26:50 -07:00
Cesar Celis Hernandez
5d591b18d9 Reduce renders in User Name when adding a user (#2106) 2022-06-10 14:57:52 -05:00
Daniel Valdivia
e68bc08fed License Page adjustments (#2109)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-10 11:22:29 -07:00
Alex
df38c84075 Changed useDispatch implementation to comply with TS specification (#2110)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-06-10 11:05:21 -07:00
Javier Adriel
c509e5db70 API to receive an email address and set it (#2095)
* Generate swagger code for new endpoints
* Implemetn swagger APIs
* Add unit tests
2022-06-09 16:13:46 -07:00
Alex
5a8e029005 Added Initial Time support to Prometheus dashboard (#2099)
Incremented initial time for data usage growth chart
2022-06-09 15:52:12 -07:00
Alex
e3d96b5bb3 Updated React router to V6 (#2107)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-06-09 15:37:21 -07:00
Daniel Valdivia
51afc337ff Fix Bucket Audit Acess width problem (#2105)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-08 11:44:28 -05:00
Cesar Celis Hernandez
617d41584e Get Tenant Details (#2097) 2022-06-08 09:05:42 -07:00
Kaan Kabalak
7a8e2caa50 Fix Invalid DOM property error (#2101)
As it is defined in a .tsx file, the AGPL Console logo was causing an
error to be displayed because the DOM property in question was not in
camel case.
2022-06-08 08:49:18 -07:00
adfost
fed58ec29a Delete remote bucket test (#2096) 2022-06-07 14:42:14 -05:00
Cesar Celis Hernandez
427a7516a3 Isolating users test in Testcafe (#2094) 2022-06-07 11:01:42 -05:00
Cesar Celis Hernandez
969feb8efa Adding Tenant Log Test (#2093) 2022-06-07 00:14:45 -05:00
jinapurapu
d09d6e1e99 Filtered list of policies being applied to group to remove duplicates (#2091) 2022-06-06 16:11:36 -07:00
Cesar Celis Hernandez
2d80638090 Add Tenant Logging Tests (#2090) 2022-06-06 13:31:27 -07:00
Daniel Valdivia
2918d39ab7 Release v0.18.1 (#2088)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-04 10:12:11 -07:00
Cesar Celis Hernandez
fb2eb0ebf7 Test logout in Operator API (#2085) 2022-06-03 22:15:13 -07:00
jinapurapu
e7a36a1ff1 Assign policy for Multiple groups (#2086) 2022-06-03 21:54:06 -07:00
Daniel Valdivia
41e1b4a5d5 Add Bucket slice refactor to reduce re-renders (#2087)
* Add Bucket slice refactor to reduce re-renders
* Fix Button on object browser
* Update Logo

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-03 21:39:12 -07:00
Daniel Valdivia
6e205fa8ae Change editor to react-textarea-code-editor. Tenant YAML a page. (#2084)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-03 21:24:18 -07:00
jinapurapu
5b3f6ad76e Fixed formatting of Site Replication Helpbox text (#2080) 2022-06-03 21:19:01 -05:00
Daniel Valdivia
8396c3023e Have TenantItem charts use capacity instead of raw capacity (#2083)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-03 17:53:58 -07:00
jinapurapu
161d56db36 Added View action to groups table in UserDetails (#2081) 2022-06-03 18:01:15 -05:00
Cesar Celis Hernandez
a49a4e5513 Add bucket replication test (#2082) 2022-06-03 17:43:24 -05:00
Cesar Celis Hernandez
9741462e7b Accommodate Login Function (#2078) 2022-06-02 22:54:33 -05:00
jinapurapu
73f09e1af6 Tooltip capitalization fixes (#2079) 2022-06-02 22:20:33 -05:00
Daniel Valdivia
d41f6e57d2 Release v0.18.0 (#2076)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-02 15:36:22 -07:00
Cesar Celis Hernandez
93d041e55b Add test to create namespace (#2075)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-02 12:24:49 -07:00
Daniel Valdivia
94e419e09c Add Pool Slice and Tenants Slice simplification (#2074)
Add Pool Slice and Tenants Slice simplification
Flatten Slice
AddPool Thunk
Return HMR support for Redux
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-02 12:11:31 -07:00
Daniel Valdivia
6c5f6934e7 Tenant Details Thunk (#2072)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-02 11:18:16 -05:00
Daniel Valdivia
41155b3f97 Show error when there's no storge classes (#2070)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-01 22:52:28 -05:00
Cesar Celis Hernandez
e41c80449d Test list of claims (#2069) 2022-06-01 20:23:14 -07:00
Alex
6f7a46e528 Disabled Servers & drives fields in edit pool (#2068)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-06-01 17:10:50 -07:00
Daniel Valdivia
ba48e0c5b8 Move EditPool redux state to it's own slice (#2063)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-06-01 15:14:31 -07:00
Lenin Alevski
3da636170f Fix MinIO expose service label (#2067) 2022-06-01 16:51:28 -05:00
Daniel Valdivia
7687a9e588 Fix Login Box height while loading (#2061)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-31 20:16:21 -07:00
Alex
692dc1a29e Remove react-hot-loader dependency (#2062)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-31 20:02:33 -07:00
jinapurapu
bb55f9f331 Disabled Assign Policy button if multiple groups selected (#2058) 2022-05-31 19:55:16 -05:00
Daniel Valdivia
dec7b138e9 Move New Credentials to separate component for Add Tenant (#2056)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-31 19:28:50 -05:00
Cesar Celis Hernandez
d3b1be80eb adjust threshold (#2066) 2022-05-31 17:05:30 -07:00
Alex
0339925d15 Added plan name icons to license page (#2060)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-31 15:29:55 -07:00
Cesar Celis Hernandez
d956ec65a2 Cover errors in registerAdminArnsHandlers (#2059)
To cover errors in registerAdminArnsHandlers
2022-05-31 12:42:16 -07:00
Alex
b02e649405 Fixed dashboards capacity Widgets (#2055)
- Added new calculation for prometheus capacity
- Added indicator colors to capacity widgets
- Adjusted capacity in drives for common dashboard

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-31 10:03:58 -05:00
Cesar Celis Hernandez
68e98be376 Add test for registerAdminArnsHandlers (#2053) 2022-05-30 21:39:55 -07:00
Cesar Celis Hernandez
c9d174df09 Wait for PVC to be bounded (#2054) 2022-05-30 21:15:03 -07:00
Daniel Valdivia
80391b867c Create Tenant Namespace Field move to Thunks (#2052)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-30 22:06:42 -05:00
Alex
45715293ea React 18 initial migration (#2044)
- Updated codemirror dependencies
- Updated react virtualized dependencies
- Fixed height of object actions buttons
- Fixed icon buttons styling
- Fixed boxIcon badge location
- Fixed actions panel buttons height
2022-05-28 15:08:22 -07:00
Cesar Celis Hernandez
dd4963e3aa Increment coverage & fix test on full disk (#2050) 2022-05-28 00:41:39 -05:00
jinapurapu
c7c7fe194c Added SA checking for DeleteUser button in UserDetails (#2049) 2022-05-27 18:51:16 -05:00
Prakash Senthil Vel
35fdaf1ddd UX license logo on sidebar (#2037) 2022-05-27 18:23:36 -05:00
Daniel Valdivia
2aa5081889 Release v0.17.3 (#2047)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-26 16:50:23 -07:00
Daniel Valdivia
9c5d4aaf11 Move Create Tenant to Thunk (#2043)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-26 16:47:39 -07:00
Cesar Celis Hernandez
04adf25e65 Add csr under tenant details (#1938) 2022-05-26 14:16:36 -07:00
adfost
8f77261872 Delete access rule test (#2018) 2022-05-26 13:34:52 -07:00
Javier Adriel
8b7505c466 Test pvc describe (#2042)
Delete test tenants after tests are done
Add test for new describe Pod section
2022-05-26 13:11:19 -07:00
Daniel Valdivia
b420ef3c1f Logs, Watch Slices to replace old reducers, Split Tenant Add slice (#2035)
Logs, Watch Slices to replace old reducers

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-25 19:12:07 -05:00
Javier Adriel
e235863b94 Test pod describe (#2040) 2022-05-25 18:47:20 -05:00
adfost
6b7948b6cd Get access rules test and test for adding access rule to non existent bucket (#1998) 2022-05-25 18:04:01 -05:00
Alex
87c373b08c Solved long file names UI issues in object browser (#2036)
Solved long file names issues in object browser

- Fixed icon size & position in list
- Fixed object name overflow issue
- Fixed object details title icon size

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-25 15:19:12 -07:00
Javier Adriel
9844269c1a Delete test tenants after tests are done (#2033) 2022-05-25 15:54:03 -05:00
Cesar Celis Hernandez
6866b84da8 To support multiple CSRs per tenant (#1997) 2022-05-25 15:07:56 -05:00
jinapurapu
5b19fb3d96 Removed unneeded encoding of credentials download (#2032) 2022-05-25 14:48:17 -05:00
jinapurapu
fce2a148b8 Populate AddUserServiceAccount policy restrictor with user permissions (#1987)
Created api to generate single JSON including all user permissions to populate AddUserServiceAccount policy restrictor
2022-05-25 11:34:26 -07:00
Cesar Celis Hernandez
69e1d653ce To update replication test accordingly (#2038) 2022-05-25 12:24:04 -05:00
Alex
9b88dd6348 Added missing types required for React 18 migration (#2034) 2022-05-25 00:10:22 -05:00
Javier Adriel
85c0e5eca2 Add new tab and section for displaying describe PVC output (#2008) 2022-05-23 21:43:29 -05:00
Alex
17684f37d9 Release v0.17.2 (#2030)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-23 11:18:47 -07:00
Harshavardhana
175b87c355 fix: getTimeFromTimestamp() incorrect padding for days (#2029)
use a simpler function to return localeString() instead.
2022-05-23 02:51:59 -05:00
jinapurapu
5fff9ebfd4 Warn if deleting user with associated Service Account (#2022)
Created api to check if users have service accounts before deleting, UI to display warning and users with associated accounts
2022-05-23 00:14:24 -05:00
Alex
795497a60d Added tenants list sort by selector (#2025)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-23 00:00:14 -05:00
Harshavardhana
48119acc72 fix: capacity reported usage value (#2028)
do not use unix-epoch to be displayed, instead
use the actual value at that epoch to be displayed.
2022-05-22 23:30:47 -05:00
Harshavardhana
ddb23ea1c8 Release v0.17.1 (#2027)
Signed-off-by: Harshavardhana <harsha@minio.io>
2022-05-21 20:24:43 -07:00
Alex
6ec7ec3c25 Fixed tenant details infinite load loop (#2026) 2022-05-20 22:19:03 -07:00
Cesar Celis Hernandez
39d3690ac0 Adding missing tests (#2024) 2022-05-20 21:50:55 -05:00
Alex
41e0fce068 Multiple fixes in resources browsing (#2019)
- Fixed subpaths search & browsing
- Fixed a regression in object browser for object details panel reset
- Added a test for these cases

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-20 20:30:39 -05:00
Javier Adriel
d876bebf28 Run unit tests and coverage for operator api (#2010) 2022-05-20 19:01:27 -05:00
Javier Adriel
7cb04ce62b Add unit test to describe pvc (#2020) 2022-05-20 18:42:33 -05:00
Cesar Celis Hernandez
326d709bf9 Increase coverage threshold (#2023) 2022-05-20 18:21:43 -05:00
Cesar Celis Hernandez
40dcc9eb33 Update Operator API Test (#2017) 2022-05-19 21:43:07 -05:00
Harshavardhana
b8f024aa39 fix: go mod tidy -compat=1.17 2022-05-19 03:41:25 -07:00
Daniel Valdivia
fbed90224f Release v0.17.0 (#2014)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-19 01:07:54 -07:00
Prakash Senthil Vel
64fe3a1dae Store bucket path if it is redirected to restore on login (#2006) 2022-05-19 02:01:47 -05:00
Alex
a160b92529 Display temporal paths when a policy has prefixes to allow navigation (#2011)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-19 00:40:52 -05:00
Daniel Valdivia
dc3e7f5888 Fix Versions Browsing Clicking on Chrome (#2013)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-18 23:58:17 -05:00
Daniel Valdivia
30d23d8555 Tweaks to Preview Max Height (#2012)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-18 23:40:47 -05:00
Prakash Senthil Vel
42deb992e6 License page updates (#2009)
Address conflicts review comments
2022-05-18 23:18:32 -05:00
Daniel Valdivia
6e31a42886 Redux Toolkit Redux Rewrite (#2003)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-18 17:02:26 -05:00
Javier Adriel
f6cab5a65b Add PVC describe API (#2007) 2022-05-17 19:02:53 -05:00
jinapurapu
448a80af4a Users screen UI revision (#1961)
* Changed Users screen UI to selector based delete, table layout changes, updated testcafe permissions test to reflect new delete User sequence, fixed ListUsers checkbox permission issue
2022-05-16 13:28:57 -05:00
Javier Adriel
6e4b8884e6 Add describe pod section to console UI (#2001) 2022-05-15 19:33:05 -07:00
Lenin Alevski
076e44e39a implement semgrep in github worflow for project (#1979) 2022-05-15 18:54:22 -07:00
Harshavardhana
1d23bf3d04 update to latest mc (#2002) 2022-05-14 15:50:59 -07:00
Daniel Valdivia
85b7f8c5d7 Update Padding on Policy Details (#2000)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-13 17:02:29 -05:00
jinapurapu
e4bf6ffd18 Fixed spacing of Bucket Events helpbox (#1999) 2022-05-13 13:58:20 -07:00
Lenin Alevski
1532cc0e70 Support for special characters and remove buggy functions (#1977)
- remove the use of encodeURI and encodeURIComponent functions and
  instead use encodeFileName and decodeFileName functions
- support for users with special characters
- support for users with special characters
- support for users with special characters
- fixed incorrectly group list display for policies

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-05-13 13:13:56 -07:00
Prakash Senthil Vel
bd63817e37 UX Policy Summary (#1996) 2022-05-13 12:48:48 -07:00
jinapurapu
e8ccfeafe1 Fixed disabled Change Password button and added clarifying text (#1973) 2022-05-13 12:10:00 -07:00
adfost
6c892f095d Add access rules test (#1995) 2022-05-13 10:58:50 -05:00
Alex
e192623c22 Simplified layout effect for closing the menu on resize (#1992)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-12 22:11:41 -07:00
Cesar Celis Hernandez
c20e9adaeb correcting sso token port for coverage (#1981) 2022-05-12 19:27:35 -05:00
Alex
fdb6d210d6 Added copy path button to breadcrumbs bar (#1990) 2022-05-12 16:01:54 -07:00
Alex
3473a10159 Changed styles of Object versions for small screens (#1988)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-12 12:23:49 -05:00
Daniel Valdivia
2d8551f0d0 Upload latest coverge to the latest prefix (#1989)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-12 11:06:25 -05:00
adfost
38c74bdfa7 Reset config test and verb change to POST (#1986) 2022-05-11 22:31:40 -07:00
adfost
117da114dc Integration Tests for Get config (#1966) 2022-05-11 22:06:19 -07:00
Daniel Valdivia
d1f67ea7ac Release v0.16.3 (#1985)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-11 17:29:49 -07:00
jinapurapu
6f6846ee2a Fixed disabled Assign Policy button for multiple group selection (#1984) 2022-05-11 15:14:03 -07:00
Alex
6409d36df0 Changed styles for object browser in small screens (#1974)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-11 14:57:43 -07:00
Prakash Senthil Vel
10f8aed021 Fix route navigation paths to match menus (#1978) 2022-05-11 13:02:01 -07:00
Daniel Valdivia
5ee9213ad0 Move Tiers, Notifications and Site Replication out of Settings Menu (#1975)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-11 12:41:56 -07:00
Daniel Valdivia
6be7527424 Upload Coverage as HTML to build bucket (#1982)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-11 12:03:23 -07:00
Harshavardhana
9edeafb0ec remove additional {} from prometheus query 2022-05-11 11:25:29 -07:00
Prakash Senthil Vel
09b0ea9a30 KBar buckets search (#1980) 2022-05-11 12:01:52 -05:00
Daniel Valdivia
f409049a51 Tests for delete bucket and config functions (#1976)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-11 09:39:43 -07:00
adfost
94b4725e24 adding set test (#1970) 2022-05-10 19:47:56 -07:00
Prakash Senthil Vel
2922a35fd2 Integration tests for inspect (#1968) 2022-05-10 19:33:24 -07:00
Cesar Celis Hernandez
d417874608 put the coverage file in play bucket (#1972) 2022-05-10 21:12:32 -05:00
Cesar Celis Hernandez
bc4abe100e increase coverage (#1971) 2022-05-10 17:03:23 -05:00
Daniel Valdivia
393f0cd2f4 Fix Icons Clipping (#1969)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-10 12:50:58 -05:00
Cesar Celis Hernandez
0c822ffa98 Add CSR end point (#1893) 2022-05-09 11:35:19 -07:00
Harshavardhana
624d9d9c4a start using xnet and simplify URL handling (#1960) 2022-05-09 11:24:43 -07:00
Alex
0d7fc0904e Removed error snack for versioning, quota & object locking in List Objects panel (#1964) 2022-05-07 23:08:50 -07:00
Alex
e5cc4a3d3a Fixed loader visibility in object details page (#1962) 2022-05-07 16:51:50 -07:00
Alex
f51763fc88 Added margin in date time picker to avoid jumpy effect (#1963)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-06 16:06:05 -07:00
jinapurapu
22390a6781 Groups UI revision (#1959)
Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
2022-05-06 11:48:04 -07:00
Alex
3854372f4d Fixed multiple issues on object browser upload (#1955)
- Fixed issue with double slashes on upload manager
- Fixed sub folders not uploading in the correct subpaths location
- Fixed an issue upload when a file is already selected
- Fixed an issue with create path button with paths finished on slash
- Simplified path handling  for object browser

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-06 11:33:13 -07:00
Klaus Post
6d22aa9955 Add streaming zip downloads (#1956)
Do not keep either objects nor the intermediate zip file in memory, and stream both the final zip and the objects as they are read.

Existing code can easily OOM the server.
2022-05-06 11:14:05 -07:00
Cesar Celis Hernandez
9d052703ad Focus on testing Diag UI only, if BE fails, we skip that (#1958) 2022-05-06 09:27:54 -07:00
Harshavardhana
3bfdbb5ec7 add support for additional prometheus labels for query (#1936) 2022-05-05 13:44:10 -07:00
jinapurapu
9103ea9d70 Fixed Watch start button to show stop button once watch has started (#1957) 2022-05-05 12:45:26 -07:00
Cesar Celis Hernandez
4c99b0d1d9 Simplify SSO Integration Test (#1954) 2022-05-05 10:29:41 -07:00
Alex
16474cbd81 Disabled versioning button when site replication is enabled (#1951)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-04 19:09:47 -07:00
Alex
f0c123932d Fixed loader issue object versions page (#1953)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-04 17:05:27 -05:00
jinapurapu
0cdff7dc0e Add User Service Account screen (#1947) 2022-05-04 14:39:21 -07:00
Prakash Senthil Vel
3c659a29ae Table tests for site replication apis (#1944) 2022-05-04 14:40:44 -05:00
Alex
42beef408c Added versions multiselection & delete selected versions buttons (#1948) 2022-05-04 09:14:52 -07:00
jinapurapu
c43d84f14b Added clarifying text to AddGroupHelpBox (#1950) 2022-05-03 21:07:58 -07:00
Alex
394a728b98 Fixed issue with quota assignation in create bucket wizard (#1949)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-03 20:35:10 -07:00
Daniel Valdivia
c741e9ccae Release v0.16.2 (#1945)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-03 11:33:42 -07:00
jinapurapu
ab835286b0 Add Service Account Policy restriction improvement (#1921) 2022-05-03 11:03:57 -07:00
Alex
6485718a97 Changed Share modal styles (#1942)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-05-02 22:30:48 -05:00
adfost
00bcb54b67 Describe pod API (#1861) 2022-05-02 18:35:36 -07:00
Alex
fef7863810 Adjusted edit / delete tags modal styles (#1939) 2022-05-02 17:01:34 -07:00
jinapurapu
427b9b4892 Integration test for PolicyNameContainsSpace (#1940) 2022-05-02 17:35:01 -05:00
jinapurapu
34adc5451d Disabled Save button on Add Policy Screen if policy name contains space (#1937) 2022-05-02 15:08:11 -07:00
adfost
224e8d4bba More groups tests (#1923) 2022-05-02 11:25:21 -05:00
Prakash Senthil Vel
07d75e19d5 UX KBar Style (#1935) 2022-05-02 11:04:07 -05:00
Daniel Valdivia
31871f54d4 Update HelpBox for Create Bucket. Add spacing. (#1934) 2022-04-30 12:00:58 -07:00
Alex
6069991405 Improvements for download / upload manager (#1933)
- Changed styles on progress bars & items
- Fixed some issues in error state & handling
- Added cancel capability to objects
- Added visual indicators when new objects are added to pool

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-29 20:54:12 -07:00
Daniel Valdivia
a017c71d20 Release v0.16.1 (#1928)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-29 18:55:43 -07:00
Harshavardhana
4001f14953 keep lookupMap for easy reading for relevant publicKey file (#1930)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-29 15:14:04 -07:00
Cesar Celis Hernandez
130413cbef having idp configured via env variable only (#1931) 2022-04-29 14:48:21 -07:00
Lenin Alevski
0622cc658b fix: parseTenantCertificates was ignoring cert-manager secrets (#1929)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Cesar Celis Hernandez <celis.hernandez.cesar@gmail.com>
2022-04-29 11:55:07 -07:00
Alex
663a5b196d Remove of suspended traffic warning in profile page (#1926) 2022-04-29 01:45:42 -05:00
Prakash Senthil Vel
6f676f73a4 UX Prometheus dashboard (#1907) 2022-04-28 19:57:16 -07:00
Daniel Valdivia
26d7001ae1 Remove all un-used CSS classes (#1924)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-28 19:33:46 -05:00
Daniel Valdivia
f79a8e8177 FormLayout Component (#1922)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-28 15:13:20 -07:00
Daniel Valdivia
0e5147bb1d Constraint PageLayout to max 1220px on large resolutions (#1919)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-28 14:34:29 -07:00
Lenin Alevski
566fb27fc1 Error and Audit logger webhooks (#1855)
Similar to MinIO now it's possible to configure webhooks to log all
triggered errors and incomming requests via env variables:

```
CONSOLE_LOGGER_WEBHOOK_ENABLE_<ID>
CONSOLE_LOGGER_WEBHOOK_ENDPOINT_<ID>
CONSOLE_LOGGER_WEBHOOK_AUTH_TOKEN_<ID>
CONSOLE_LOGGER_WEBHOOK_CLIENT_CERT_<ID>
CONSOLE_LOGGER_WEBHOOK_CLIENT_KEY_<ID>
CONSOLE_LOGGER_WEBHOOK_QUEUE_SIZE_<ID>

CONSOLE_AUDIT_WEBHOOK_ENABLE_<ID>
CONSOLE_AUDIT_WEBHOOK_ENDPOINT_<ID>
CONSOLE_AUDIT_WEBHOOK_AUTH_TOKEN_<ID>
CONSOLE_AUDIT_WEBHOOK_CLIENT_CERT_<ID>
CONSOLE_AUDIT_WEBHOOK_QUEUE_SIZE_<ID>
```

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-04-28 12:55:06 -07:00
Lenin Alevski
8c18829089 Update DNS Rebinding etcd vulnerable dependency (#1918)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-04-28 14:21:17 -05:00
adfost
c68c175827 committing new tests (#1879) 2022-04-28 11:52:37 -05:00
dependabot[bot]
415088ae2d Bump ejs from 3.1.6 to 3.1.7 in /portal-ui (#1915)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.7.
- [Release notes](https://github.com/mde/ejs/releases)
- [Changelog](https://github.com/mde/ejs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mde/ejs/compare/v3.1.6...v3.1.7)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 11:00:34 -05:00
adfost
158926f192 groups_test (#1916) 2022-04-28 08:09:06 -07:00
Lenin Alevski
f026ffffc8 Fix profiling endpoint and adding tests (#1917)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-04-27 20:07:32 -07:00
Cesar Celis Hernandez
bd0edea3df Increase coverage threshold (#1914) 2022-04-27 16:49:58 -05:00
Alex
07b4dad4d3 Fixed issues with Quota modal (#1911)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-27 14:08:19 -07:00
Cesar Celis Hernandez
0df796bc03 fixing integration tests to use proxy (#1912) 2022-04-27 12:33:10 -07:00
Daniel Valdivia
cf0212391e Console Swagger Module Reorganization (#1881)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
2022-04-27 11:45:04 -07:00
Alex
cb3a695c25 Removed quota from versioning section & added inside summary page (#1910)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-27 09:36:39 -07:00
Daniel Valdivia
3040d468db Release v0.16.0 (#1904) 2022-04-25 15:41:06 -07:00
jinapurapu
9df300b241 Changed from modal to screen for Add Group link on empty Groups screen (#1905) 2022-04-25 15:51:19 -06:00
jinapurapu
870cef7b65 Added error handling for group already existing (#1902) 2022-04-25 15:42:50 -05:00
Daniel Valdivia
d9843d50cd Fix Subpath parsing (#1900) 2022-04-25 15:23:40 -05:00
Alex
9c64c5732b Removed spaces next to breadcrumbs slashes (#1903)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-25 13:12:26 -07:00
Harshavardhana
275d87f302 config set should always use on/off not true/false (#1899)
fixes https://github.com/minio/minio/issues/14516
2022-04-25 07:47:56 -07:00
Daniel Valdivia
509f4953bb update all dependencies (#1853)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-23 08:45:46 -07:00
Alex
63d1fb2abb Added UI for Domains edit (#1897)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-23 10:31:04 -05:00
Alex
b3afa34535 API for domains update (#1889)
* API for domains update

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-23 02:19:14 -05:00
Daniel Valdivia
8203449d92 Format Add Users/Groups, Fix bug on Add Service Account (#1898)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-22 22:36:41 -07:00
Daniel Valdivia
8a96d8d8a5 Fix spacing on Add tenant forms (#1895)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-22 21:59:18 -07:00
jinapurapu
66df609d4a Moved AddUser from modal to screen (#1869)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-22 21:40:20 -07:00
jinapurapu
fda090f7dd Created Add Policy screen (#1896) 2022-04-22 23:21:06 -05:00
jinapurapu
74d4c4a3e6 Create Add Group screen (#1890) 2022-04-22 20:50:31 -07:00
Kaan Kabalak
c6798a69d9 Remove duplicate Inspect page path (#1891) 2022-04-22 20:58:40 -05:00
Daniel Valdivia
5a484550fb New Login (#1894)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-22 20:40:57 -05:00
jinapurapu
b567e4855f Create service account screen (#1886) 2022-04-22 19:49:24 -05:00
Kaan Kabalak
c2303f78df Remove redundant Tools path (#1887) 2022-04-21 23:16:06 -05:00
Alex
bbe494f85c Fixed create path issue when object details is open (#1885)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-21 18:28:15 -05:00
Alex
715dbbb92c Fixed Objects list reload after file upload (#1888) 2022-04-21 16:56:18 -06:00
Cesar Celis Hernandez
c2455e3f06 Fixing Permissions Tests Part 2 (#1884) 2022-04-21 17:31:52 -05:00
Alex
997052a872 Fixed breadcrumbs container overflow in object browser (#1880)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-20 21:38:23 -07:00
Daniel Valdivia
3e13e6db98 Small Styling Adjustments. Lists style. (#1870)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-20 14:41:08 -05:00
Cesar Celis Hernandez
3291b3ca45 Test change password response (#1877) 2022-04-20 13:38:49 -05:00
Daniel Valdivia
74ba1c80a9 Fix the relative login redirects (#1872)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-20 12:57:28 -05:00
Alex
af76280f1d Added console & minio domains selector to add tenant wizard (#1863)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-20 12:29:06 -05:00
Cesar Celis Hernandez
9b7fdfd286 Removing unnecessary error check (#1876) 2022-04-20 11:07:16 -05:00
Daniel Valdivia
cefb95dc74 Revert "Create docker-publish.yml (#1789)" (#1875) 2022-04-20 00:31:18 -07:00
Alex
f15a7ff5f6 Added tenant domains to summary page (#1864)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-19 23:31:53 -05:00
Alex
6c123ce2b5 Prettier update to v2.6.2 (#1873)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-19 23:06:05 -05:00
adfost
d7588eaea1 Add policy test (#1874) 2022-04-19 20:39:19 -07:00
Prakash Senthil Vel
8cd756599f Top Bar UX back icon and link (#1860) 2022-04-19 20:56:40 -05:00
Cesar Celis Hernandez
5b25a6cb53 Recalibrating our coverage threshold (#1871) 2022-04-19 20:19:50 -05:00
Prakash Senthil Vel
82a0b67a26 Disable Bucket replication tab when site replication is enabled in Bucket Summary page (#1858) 2022-04-19 17:50:58 -05:00
Alex
1fa6b0a353 Updated insecure dependencies (#1865)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-19 10:34:01 -07:00
Prakash Senthil Vel
46151a5e55 UX basic dashboard (#1866) 2022-04-19 08:16:26 -07:00
adfost
f36c07aa68 Fixing SSO Operator mode showing CONSOLE (#1808) 2022-04-18 15:47:16 -07:00
Daniel Valdivia
86797cda20 Test for Get Object with Preview (#1848)
* Test for Get Object with Preview

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-18 14:03:06 -05:00
Cesar Celis Hernandez
50bc755b44 Test invalid url in getWatchOptionsFromReq() (#1850) 2022-04-18 07:25:21 -07:00
Daniel Valdivia
f02461097b Release v0.15.14 (#1856)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-18 00:46:13 -07:00
Daniel Valdivia
b36aed8845 Adds support to proxy WS requests on Hop (#1857)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-17 23:16:12 -07:00
Daniel Valdivia
991cc0953e Make Login assets and redirects relative (#1854) 2022-04-16 22:05:53 -07:00
Daniel Valdivia
ef4587b596 Create docker-publish.yml (#1789) 2022-04-14 16:13:45 -07:00
Daniel Valdivia
75e2d1d9ce Release v0.15.13 (#1852)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-14 15:53:15 -07:00
Cesar Celis Hernandez
75fc68cd18 correcting error message to be same as our code (#1851) 2022-04-14 14:55:32 -07:00
Prakash Senthil Vel
ae34d886a9 Add site in a new page (#1845) 2022-04-14 13:19:45 -07:00
Daniel Valdivia
f2c187bf7c Fix early context cancellation when downloading/previewing object (#1846)
* Fix early context cancellation when downloading/previewing object
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-14 09:44:08 -07:00
Daniel Valdivia
243e51fe83 Release v0.15.12 (#1843)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-14 00:49:04 -07:00
Prakash Senthil Vel
d1d3d91fc1 Site replication status (#1834)
Site replication status UI
Site replication status ui-test
Address review comment by Alex
Add functional test for API
Add integration tests for status API
2022-04-14 00:21:43 -07:00
Alex
4541b4de03 Added domains item in create tenant & get tenant requests (#1841) 2022-04-14 00:42:38 -06:00
Alex
291e1fce55 Replaced Usage bar in tenant details to display tiers information (#1836)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-13 22:41:38 -07:00
Alex
bbb4090cd8 Remove of non-used console logs (#1842)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-13 21:51:11 -07:00
Alex
a30d29b437 Added URL support to object view (#1831)
- Added URL support to object view
- Refactored & simplified requests

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-13 23:06:31 -05:00
jinapurapu
e6404be02f Added tooltip to prefix field of Add Access Rule modal (#1839) 2022-04-13 19:07:08 -05:00
Cesar Celis Hernandez
5e10719168 Adding test to cover registerAdminArnsHandlers() (#1835) 2022-04-13 07:13:19 -07:00
Lenin Alevski
68f9019d0e Fix: compress health diagnostics file when download (#1821) 2022-04-12 18:29:19 -07:00
Shireesh Anjal
d8e7d343ba Update madmin-go and mc to latest versions (#1832) 2022-04-12 18:41:11 -05:00
Cesar Celis Hernandez
0e5561032c Adding unittest for user_watch.go (#1833) 2022-04-12 16:28:48 -07:00
Daniel Valdivia
fc490a1ca8 Release v0.15.11 (#1830) 2022-04-11 20:32:10 -07:00
Daniel Valdivia
6e6aab580c Replace aws:username, jwt: and ldap: policy variables in session policies (#1828)
* Replace username variable in session policies

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-11 20:01:49 -07:00
Alex
dc5b1963ae Fixed typo in create tenant screen (#1829)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-11 19:13:37 -07:00
Daniel Valdivia
564cfa2201 Remove ResponseHeaderTimeout from default http transport (#1827)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-11 17:18:22 -07:00
Lenin Alevski
398ab028a4 Removing hardcoded timeouts (#1826)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-04-11 16:20:30 -07:00
jinapurapu
1de712c099 Added titleIcon to UserAddServiceAccount modal (#1825) 2022-04-11 14:15:20 -07:00
jinapurapu
2d26eb4a70 Updated Tiers help text for consistency with button (#1824) 2022-04-11 12:54:53 -07:00
Cesar Celis Hernandez
e9cc567977 correcting the testing package (#1819) 2022-04-11 09:56:16 -07:00
Daniel Valdivia
ee82748aeb Release v0.15.10 (#1820)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-09 18:05:04 -07:00
Prakash Senthil Vel
ee3affd140 UI site replication (#1807) 2022-04-09 16:27:25 -07:00
dependabot[bot]
836090a0d5 Bump moment from 2.29.1 to 2.29.2 in /portal-ui (#1817)
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-09 00:38:56 -07:00
Alex
e0e5e42af2 Remove duplicated versioned item in breadcrumbs (#1816) 2022-04-08 22:20:25 -06:00
Alex
49f340b5f8 Fixed assign policies screens (#1815) 2022-04-08 09:38:23 -07:00
Alex
404a10d3c7 Added fixed background color to pie chart (#1812)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-07 21:03:17 -07:00
Daniel Valdivia
62e270e95e Tenant Forms alignment. Components Page. (#1811)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-07 20:06:28 -07:00
Alex
bfbaaf12fb Add Edit pool capability (#1806)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-07 19:24:37 -07:00
Lenin Alevski
0aa9c7b36e Updating operator dependency to latest (#1810)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-04-07 19:08:35 -07:00
Lenin Alevski
8540168133 Identity Provider screen for TenantDetails (#1809)
- fixing encryption page styles
- removing extra fields on gemalto configuration
- backend endpoints for tenant identity provider details
- force restart tenant pods when identity provider configuration change
- force restart tenant pods when tls certificates change
- existing tls secrets are not deleted from tenant namespace, just removed from the tenant

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-04-07 18:40:09 -07:00
Daniel Valdivia
02a35fb8d1 Operator UI Adjustments (#1805)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-06 19:08:24 -07:00
Prakash Senthil Vel
4647671f07 UX Basic Dashboard (#1799) 2022-04-05 22:48:35 -07:00
adfost
f30450c3c1 Adding usage objects and versions to tiers (#1796) 2022-04-05 22:31:09 -07:00
CommanderRoot
731501ba27 refactor: replace deprecated String.prototype.substr() (#1800)
.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-04-05 17:42:20 -05:00
Daniel Valdivia
62a8bf05bb Release v0.15.9 (#1801)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-05 12:30:58 -07:00
Alex
d8754a2e3e Don't display "NaN B" in tenant capacity (#1802)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-05 11:16:55 -07:00
Alex
64ffa039b4 Operator improvements (#1798)
Added new design to Tenants page list
Added Pool details initial page

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-04-05 09:27:54 -07:00
Daniel Valdivia
822724a4f1 Fix Add Bucket Lifecycle Rule (#1797)
Fix Add Bucket Lifecycle Rule
Fix Edit ILM Rule
Update Bucket ILM Rules Listing

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-04 19:13:59 -07:00
Prakash Senthil Vel
c18c843d03 UX code mirror button colors (#1792) 2022-04-04 14:18:02 -05:00
jinapurapu
1d362aceaf Added node and type selector UI to Error Logs screen (#1715) 2022-04-04 11:54:03 -07:00
Daniel Valdivia
6f5cb4d1a5 Make Bucket Icon Browse the bucket (#1795) 2022-04-04 10:25:46 -07:00
Harshavardhana
2cefa0860d update for go mod tidy 2022-04-03 13:05:57 -07:00
Cesar Celis Hernandez
ea0c83ea74 Node Labels Test (#1787) 2022-03-31 18:35:25 -06:00
Daniel Valdivia
90f64b685e Release v0.15.8 (#1786) 2022-03-31 17:06:27 -07:00
Daniel Valdivia
62f925d93c Remove Autocapitalizing CSS (#1785)
Remove Autocapitalizing CSS
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-31 15:58:40 -07:00
Alex
1985c110b1 Not show objects with the same path (#1784)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-31 13:49:55 -07:00
Prakash Senthil Vel
461bc94a0b UX Trace Screen (#1781) 2022-03-31 12:05:10 -07:00
Aditya Manthramurthy
aaa55a1f4a Fix authorization code flow handling (#1767)
Remove checking for unnecessary response types - this has been causing a regression since MinIO release RELEASE.2022-03-03T21-21-16Z
2022-03-31 11:21:32 -07:00
Prakash Senthil Vel
2eecabf5e6 Site replication API (#1773)
Site replication API
tests in CI/CL environment
2022-03-31 10:11:01 -07:00
Lenin Alevski
fba9bd87df TLS Certificate React component (#1780)
Add support to parse multiple blocks on pem certificate
Added react tls certificate component

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-31 09:56:39 -07:00
Alex
bf461b8b27 Migrated AddPool modal to be a single page (#1782)
Also included extra fields configuration

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-31 10:24:21 -06:00
Alex
301c4a83b5 Changed breadcrumbs bar position (#1783)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-30 21:27:08 -07:00
Alex
87468571ae Changed Size column width in object browser (#1779)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-30 09:30:35 -07:00
Alex
7ad2df3e7f Fixed loader for LinearGraphWidget (#1778)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-30 09:14:21 -07:00
Daniel Valdivia
baef7b5ec0 Release v0.15.7 (#1776)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-29 14:20:00 -07:00
Prakash Senthil Vel
fa8c59360a Fix sidebar navigation state (#1775)
Fix sidebar navigation state
2022-03-29 09:31:54 -07:00
Lenin Alevski
ceeacd2167 fix: pass original http response code to proxy response (#1772)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-28 17:19:15 -07:00
Cesar Celis Hernandez
70214a6578 List Users With Access to a Given Bucket Integration Test (#1771)
List Users With Access to a Given Bucket Integration Test
Incrementing coverage threshold
2022-03-28 16:12:52 -07:00
adfost
d1a5e5ba57 Adding delete remote bucket functionality (#1762) 2022-03-28 15:36:23 -07:00
jinapurapu
fcd50257ee Updated BasicDashboard UI to expand drives initially if single server (#1768) 2022-03-26 15:25:14 -07:00
Cesar Celis Hernandez
2765fb0c97 Get objects in a bucket for a rewind date Test (#1766)
* Get objects in a bucket for a rewind date Test

* Incrementing the coverage
2022-03-25 11:34:29 -06:00
Cesar Celis Hernandez
d22f345d4a SSO Integration Test (#1742) 2022-03-24 20:11:42 -07:00
Daniel Valdivia
b658301725 Release v0.15.6 (#1763)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-24 17:14:41 -07:00
Lenin Alevski
1417375d99 Tests for Object delete button on SideBar (#1746)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-24 16:22:11 -07:00
Cesar Celis Hernandez
676420a2b3 List Policies With Given Bucket Test (#1765)
List Policies With Given Bucket Test
Incrementing the coverage
2022-03-24 15:25:38 -07:00
adfost
ffa9436276 Delete PVCs upon tenant deletion checkbox (#1752) 2022-03-24 13:17:04 -06:00
adfost
f6d92d50e4 disable legalhold if no locking (#1758) 2022-03-24 10:14:19 -07:00
Lenin Alevski
bc1cb820d1 Multiple files upload refactor (#1755)
- failed uploaded objects progress bar shows in red color
- fixed bug in where failed uploaded objects cannot be removed from
  listed objects in ObjectManager
- display delete button for failed upload objects
- display setErrorSnackMessage component after done uploading all
  objects with number of failed objects
- fixed race condition bug during multiple objects upload, now we are
  using Promise.allSettled to handle synchronization between uploads

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-24 00:11:29 -07:00
Daniel Valdivia
8772c158c6 Github Actions Job Ordering - Longer jobs first (#1761)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-23 22:26:13 -07:00
Daniel Valdivia
d673473d5e Fix Delete Versions Tests Race condition (#1760)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-23 21:47:51 -07:00
Daniel Valdivia
bb22a1d62a Fix bug when selecting storage type for AWS (#1759)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-23 21:01:14 -07:00
Cesar Celis Hernandez
f582d83afc Splitting permission test (#1757) 2022-03-23 18:35:10 -07:00
Lenin Alevski
b12fa5edfd Enable/Disable Object details actions depending on user permissions (#1756)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-23 17:17:57 -07:00
Daniel Valdivia
65eee7c1d0 Updating Operator Dependency (#1753)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-23 17:44:48 -06:00
Alex
de4cf3b554 Updated dependencies for yarn audit issues (#1749)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-23 14:36:11 -07:00
Daniel Valdivia
cca04dca1c Small tweaks (#1754)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-23 14:28:13 -07:00
Alex
bef3897d0a Added tolerations selector to Add Tenant wizard (#1747)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-23 11:49:55 -06:00
adfost
842c3dee5f Bucket rollback if remote bucket creation failed (#1744) 2022-03-22 21:42:31 -06:00
Lenin Alevski
d1d39df71e Fix enable/disable delete button for object (#1745)
- Pass the right resource to SecureComponent wrapper for delete button,
  bucket/object-full-path-including-prefix

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-22 14:36:20 -06:00
Daniel Valdivia
2321343d5e Release v0.15.5 (#1741)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-21 12:12:35 -07:00
Daniel Valdivia
ce4d9310aa AWS Marketplace Integration Updates (#1740)
Makes the create tenant for MK AWS updated with new recommendations
Fixes Back Link icon alignment and color
Adds a helpbox for MK AWS

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-21 10:21:39 -07:00
Daniel Valdivia
58c53cbe0a Release v0.15.4 (#1739)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-20 02:11:09 -07:00
Cesar Celis Hernandez
144979b372 Delete Multiple Service Accounts (#1737)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-19 17:30:20 -07:00
Alex
e29fa04051 Enabled Delete button for sub resources (#1738)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-19 15:29:27 -07:00
Alex
5ab5232474 Delete Non-current versions (#1735)
- Delete Non-current API
- Delete non current modal implementation
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-18 13:07:34 -07:00
Lenin Alevski
d7fef8d89e Profiling endpoint fixes (#1707)
- Added support to download all profile tests
- profile.zip file was corrupted after download
- Add suspension warning
- Add Checkbox support
- Support for running multiple profiling types at the same time
- fix profiling test

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-18 13:52:42 -06:00
Cesar Celis Hernandez
3a09361899 List tenants by namespace test (#1736) 2022-03-18 10:18:37 -07:00
Prakash Senthil Vel
6ca17a3f9c Log text color styles and empty state (#1733)
Log text color styles and empty state
2022-03-17 22:19:45 -07:00
Alex
6d40ff7e1b Enabled Delete selected version functionality (#1731)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-17 19:21:21 -07:00
adfost
0b29eee9ed Adding bucket object tag tests (#1732)
adding bucket object tests
2022-03-17 19:09:04 -07:00
jinapurapu
c7fdfdd035 Added download all credentials button, added tooltips, removed Done button, Updated test to use corner X instead of Done button (#1704) 2022-03-17 13:30:30 -06:00
Daniel Valdivia
d7626e187c Integration Test: Create Service Account (#1725)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-17 13:15:06 -06:00
Cesar Celis Hernandez
39453de8fb To use DeleteMultipleObjects func and be able to debug via Browser (#1730) 2022-03-17 11:27:45 -07:00
Daniel Valdivia
0c38e93b83 Remove un-used code (#1729) 2022-03-16 22:29:43 -06:00
Prakash Senthil Vel
bf8db812b8 Address review comments (#1709) 2022-03-16 16:47:11 -07:00
Alex
0e35da8370 Added versions pill to versions page elements (#1728)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-16 16:36:53 -07:00
Cesar Celis Hernandez
b11fa26162 Adding test for creating tenant via API (#1727) 2022-03-16 15:57:30 -07:00
Prakash Senthil Vel
e3836538fc UX back button to be consistent in all screens (#1726) 2022-03-16 10:22:02 -07:00
Daniel Valdivia
9301e3b7de Release v0.15.3 (#1724) 2022-03-15 22:42:05 -07:00
jinapurapu
cf5e5a14b5 Updated tenant creation credentials download to allow mc alias import (#1683)
Removed underscore from credentials
Made credentials download output match mc alias import expected format
Added URL to createServiceAccountCreds return
2022-03-15 21:01:03 -07:00
Cesar Celis Hernandez
7f4546e879 Adding Access Rules Integration Test (#1719) 2022-03-15 20:49:17 -07:00
Alex
1a92c59e3f Added background color to selected version (#1723)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-15 20:42:12 -07:00
Alex
ade9731773 Reload main object information after restoring a version (#1720)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-15 21:26:57 -06:00
Cesar Celis Hernandez
cc43b3c743 Add list of tenants integration test (#1722) 2022-03-15 21:13:33 -06:00
Alex
b29f6a1640 Changed Sort by field to use only Date & Size (#1721)
Added size column
Changed Versions Sort by field to be only date & size
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-15 18:03:42 -07:00
Daniel Valdivia
62b8258989 Fix Get Latest MinIO Image on Tenant Create (#1703)
* Fix Get Latest MinIO Image on Tenant Create

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* remove `operator_` prefix on files in operatorapi

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-15 15:16:26 -07:00
adfost
75bc568e4b Adding delete versions test (#1701)
adding delete versions ui test
2022-03-15 14:40:48 -07:00
Alex
b0119a55df Reload versions list after clicking on Reload button (#1717) 2022-03-15 09:45:28 -07:00
Alex
78983ce76f Added (Default) label to EC Parity selector field & fixed automatic selection of EC Parity (#1716)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-14 23:47:38 -07:00
Cesar Celis Hernandez
e060e1d97e Add Bucket LifeCycle Integration Test (#1711) 2022-03-14 19:48:25 -06:00
Daniel Valdivia
82bdc228b2 Add preview icon to object versions (#1713)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-14 15:48:20 -07:00
adfost
1fa8311af7 adding distributed setup (#1712) 2022-03-14 15:34:21 -06:00
Daniel Valdivia
93243f2c77 Run Testcafe tests with Node 16 (#1714)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-14 12:11:07 -07:00
adfost
3b423826fd Removing delete all versions option from non versioned bucket (#1710) 2022-03-14 11:13:23 -07:00
Daniel Valdivia
e44a7c94c6 Bug Fix: Preview a specific Object Version ID (#1706) 2022-03-11 22:40:14 -08:00
Daniel Valdivia
63c0d260ca Release v0.15.2 (#1696)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-11 02:35:22 -08:00
Lenin Alevski
607ca5742b Adding missing lookup fields for LDAP configuration in UI (#1698)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-11 00:18:46 -08:00
Cesar Celis Hernandez
86a3072fa9 Increasing coverage threshold from 48% to 49.4% (#1697)
* Increasing coverage threshold

* correcting the comparison logic
2022-03-10 22:42:09 -08:00
Cesar Celis Hernandez
94c60e1837 add test to delete bucket encryption (#1695) 2022-03-10 15:05:19 -08:00
Alex
5e4ad55bbd Replaced CircularProgress component with new Loader (#1690)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-10 16:18:22 -06:00
Alex
e01d8bc10e Replaced main loader for index.html (#1694)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-10 13:53:32 -08:00
Alex
74605adbee Login Page Improvements (#1692)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-09 22:11:39 -08:00
Cesar Celis Hernandez
c6bd1a28d3 Adding Get bucket encryption information test (#1691) 2022-03-09 23:00:31 -06:00
Kaan Kabalak
b4ea4e7499 Fix whitespace appearing on Login scroll after height decrease (#1689)
Fixes #1688
2022-03-09 16:35:13 -08:00
Cesar Celis Hernandez
414db326bb Adding bucket encryption test (#1687) 2022-03-09 14:07:15 -08:00
Alex
3186c1a0d0 Added Loader to Console (#1686)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-09 09:28:37 -08:00
Harshavardhana
17c70d6c07 support admin:KMSCreateKey as part of IAM policy actions (#1685) 2022-03-08 15:05:43 -08:00
Alex
57ad200288 Fixed Invalid Date message in certificates page (#1684)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-08 14:45:16 -06:00
Harshavardhana
842c11f414 update all direct deps for console (#1655) 2022-03-08 12:13:05 -08:00
Daniel Valdivia
d20be7f836 Release v0.15.1 (#1680)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-07 22:45:20 -08:00
Alex
8008f226a8 Added Show deleted objects functionality in objects list (#1681)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-07 22:17:06 -08:00
Alex
fbfc1557c7 Removed Welcome to label from login screen (#1682) 2022-03-07 21:35:23 -08:00
adfost
dcf6a521a6 Inspect Object (#1663) 2022-03-07 19:52:36 -08:00
Cesar Celis Hernandez
25562bd55b re-using code by implementing add bucket verification only once (#1678) 2022-03-07 19:03:00 -08:00
Cesar Celis Hernandez
bff35bb13a Adding object-locking test (#1674) 2022-03-07 18:50:28 -08:00
Prakash Senthil Vel
b481b35419 Region list select in Add Tier screen (#1657)
Region list select in Add Tier screen
2022-03-07 18:35:21 -08:00
Daniel Valdivia
d96b2e5bd5 Update Swagger Header File Year (#1679)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-03-07 18:24:09 -08:00
Daniel Valdivia
8e21039ef1 New Login Design (#1675)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-07 19:56:42 -06:00
Lenin Alevski
5e42f96eaf Validate basePath for console (#1677)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-07 17:30:36 -08:00
Lenin Alevski
7bc65031c4 Nancy vulnerability dependency scanner (#1676)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-07 14:47:07 -08:00
Cesar Celis Hernandez
fd09a4c815 Cleaning our logs for clarity (#1670)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-07 14:08:27 -08:00
adfost
5977e9e82f adding access_key (#1652) 2022-03-07 13:54:42 -08:00
Cesar Celis Hernandez
f5edca5a31 Add Set Bucket Versioning Test (#1669)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-07 13:37:55 -08:00
adfost
433868ddf5 cleaning up delete multiple (#1668)
Co-authored-by: Cesar Celis Hernandez <celis.hernandez.cesar@gmail.com>
2022-03-07 13:04:39 -08:00
Cesar Celis Hernandez
7c26d583a6 Allow manually executing integration tests (#1671) 2022-03-05 12:20:00 -08:00
Alex
9c63bad6ee Added select all buckets functionality (#1672) 2022-03-05 08:44:28 -07:00
Cesar Celis Hernandez
4d4a159d24 increase coverage threshold (#1667) 2022-03-04 12:21:41 -08:00
Cesar Celis Hernandez
4cb48b86aa Add get bucket versioning test on top of an existing test (#1666) 2022-03-04 10:26:15 -08:00
Cesar Celis Hernandez
2c548be5af reuse golang dependencies (#1662) 2022-03-04 11:40:46 -06:00
Daniel Valdivia
bfaea09c0b Logs Re-Design (#1656) 2022-03-03 15:18:19 -08:00
Prakash Senthil Vel
06bfe52e7a UX License page with registered state (#1650)
UX License page with registered state
2022-03-03 13:58:35 -08:00
Cesar Celis Hernandez
0de9ff38f4 removing operator repo (#1659) 2022-03-03 14:00:49 -06:00
Cesar Celis Hernandez
768181cf8b improving coverage limit check (#1647) 2022-03-02 22:26:32 -06:00
Cesar Celis Hernandez
eb3881fc74 Adding delete bucket replication test (#1654) 2022-03-02 16:55:26 -08:00
jinapurapu
2c55722e30 Removed mage (#1653) 2022-03-02 12:39:37 -08:00
Lenin Alevski
26d5972ab5 Whitelist for preview files from the backend (#1651)
This PR adds a whitelist of safe files to download with
`Content-Disposition: inline;` from the backend, all other files will be
force download via `Content-Disposition: attachment;` existing svg files
will still be rendered in a secure way via the html `image` tag.

reference: https://digi.ninja/blog/svg_xss.php

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-03-02 14:18:43 -06:00
Prakash Senthil Vel
20ba19affc UX error alert banner (#1620) 2022-03-01 21:36:25 -06:00
Harshavardhana
c86f57862d remove continue and use break (#1649)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-01 17:03:57 -08:00
Daniel Valdivia
f92f3e3382 Testcafe: Add tenant without audit log (#1644) 2022-03-01 16:39:42 -08:00
Harshavardhana
cd72c535d0 update go.sum with 'go mod tidy -compat=1.17' 2022-03-01 16:18:30 -08:00
Daniel Valdivia
439bc1a2a7 Release v0.15.0 (#1648)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-01 16:14:00 -08:00
Harshavardhana
fb99cf3805 reject IDPs without supported response_types (#1645)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-01 15:20:27 -08:00
Alex
a0bf2b49db Fixed delete object behavior (#1646)
Also fixed an issue with multi-select & panel sizes

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-01 13:23:18 -08:00
Cesar Celis Hernandez
57e995fc71 Blocking PR to be merged if coverage is below the threshold (#1640) 2022-03-01 14:08:32 -06:00
Alex
36134f481e Reset File input value after file upload (#1642)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-03-01 10:50:46 -08:00
Daniel Valdivia
632c66539e Move Add Tenant Configure Audit Log and Monitoring to their own tabs (#1636)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-01 10:32:50 -08:00
Cesar Celis Hernandez
645f98284d Adding bucket replication test (#1635)
Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-03-01 09:08:22 -08:00
Daniel Valdivia
19dd7aad89 Fix Kbar in operator mode (#1638)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-01 09:50:46 -06:00
Prakash Senthil Vel
d82bd31bf1 Add Testcafe tests (#1625) 2022-03-01 00:21:51 -08:00
Lenin Alevski
4fa2f16e9a Update encryption configuration screen for tenant (#1611) 2022-02-28 23:56:38 -08:00
Daniel Valdivia
208afdfc3a Remove Operator UI Storage Page (#1639)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-03-01 00:58:20 -06:00
Alex
69a3ee6c1a Updated design of object details panel (#1637)
- Removed old references to object details
- Created new Tags edit module

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-28 22:30:13 -08:00
Cesar Celis Hernandez
96d59fb7cc Delete Bucket Event Test (#1633) 2022-02-28 14:53:14 -08:00
Alex
3395d1c853 Added navigation support to object versions (#1626)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-28 10:17:57 -06:00
Cesar Celis Hernandez
e52fb7d8b5 Speed up tests (#1630) 2022-02-27 21:57:33 -08:00
Cesar Celis Hernandez
be326c37d0 Correcting DB name (#1631) 2022-02-26 22:40:08 -08:00
Alex
1251232e30 Misc Changes (#1628)
- Changed placeholder for enter comment
- Removed fmt.Println with garbage text

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-26 19:00:09 -08:00
Harshavardhana
fa2a212607 do not add naked 'fmt.Print' (#1627) 2022-02-25 22:17:42 -08:00
Cesar Celis Hernandez
af3b0cd5f3 splitting admin tests from users tests (#1619) 2022-02-24 20:27:37 -06:00
Daniel Valdivia
86fa54d64a Release v0.14.8 (#1623)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-24 13:42:11 -08:00
Daniel Valdivia
576abdeec4 Fix Hop hiding menu (#1621)
* Fix Hop hiding menu

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* Fix Menu

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-24 13:24:29 -08:00
Harshavardhana
04da7ec364 update CREDITS for new deps 2022-02-24 13:00:38 -08:00
Cesar Celis Hernandez
815648fe32 Adding the restart API test (#1617) 2022-02-23 22:49:35 -06:00
Harshavardhana
5af76176cd update minio/pkg 2022-02-23 14:29:07 -08:00
Harshavardhana
b1ed8307dd update minio/pkg, minio/madmin-go, minio/minio-go/v7 2022-02-23 14:27:25 -08:00
adfost
b8122ec2bd Pods Summary UI improvements (#1449) 2022-02-23 11:37:26 -06:00
Daniel Valdivia
2b196b89e9 Updates to Add ILM Rule Modal (#1606)
* Updates to Add ILM Rule Modal
* Remove default 0 values for days inputs
2022-02-22 16:50:04 -08:00
Daniel Valdivia
5f1c830f47 Exclude some units from tenant size dropdown (#1615)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-22 15:55:49 -08:00
Cesar Celis Hernandez
83fc075bc9 Using Kustomize to get YAML files (#1616) 2022-02-22 17:20:24 -06:00
Daniel Valdivia
8dc000c13b Add contextual unit selector for tenant add. (#1614)
* Add contextual unit selector for tenant add.

Additionally Fix bug on Get Tenant Monitoring and Set tenant Monitoring

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* Fix comment

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-22 12:12:45 -08:00
Cesar Celis Hernandez
b130c89297 Get Operator files for testing (#1613) 2022-02-22 12:53:39 -06:00
Prakash Senthil Vel
4bc90588fb Add tier mandatory or optional fields and navigation post save (#1612) 2022-02-22 12:30:48 -06:00
Prakash Senthil Vel
006b3c7da8 UI for Inspect (#1583) 2022-02-22 12:05:31 -06:00
Cesar Celis Hernandez
1f97f39864 Add test for Put Objects legalhold status end point in Console API (#1577) 2022-02-22 11:39:58 -06:00
Alex
c15d75e619 Changed breadcrumbs styles (#1610)
- Added onKey press support to input boxes

- Added enter key support to create path modal

- Replaced bucket icon

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-22 11:14:55 -06:00
Cesar Celis Hernandez
844162a7ab Add test to list the tenants in Operator UI (#1605)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-02-21 21:57:09 -08:00
Daniel Valdivia
56c4311a6b Add feature hide-menu for embedded screens on Operator UI (#1604)
* Add feature hide-menu for embedded screens on Operator UI

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-21 23:42:18 -06:00
Cesar Celis Hernandez
28dcd19dd9 Adding IDs for Operator tests (#1599) 2022-02-18 22:08:07 -06:00
Alex
78e4e3fd08 First set of redesign objects listing (#1602)
- Removed table action buttons & global actions

- Changed Upload Files label

- Added reload, new path & rewind buttons in top bars

- Added multi-select objects panel & table behaviors for single selection & multiselection

- Fixed disabled action button styles

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-18 10:18:09 -08:00
Daniel Valdivia
1cdc719405 Add Create Bucket action to kbar (#1600)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-17 15:34:56 -08:00
Cesar Celis Hernandez
3cc218b97e Add test for List Bucket Events end point (#1576) 2022-02-17 13:13:41 -06:00
Cesar Celis Hernandez
1f6e2e7f43 Put proper name to the tests (#1598) 2022-02-17 11:09:44 -06:00
Cesar Celis Hernandez
9f521bbfb4 Add Operator test (#1591) 2022-02-17 10:54:16 -06:00
Daniel Valdivia
9c19c639dd Release v0.14.7 (#1594)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-16 21:05:41 -08:00
Daniel Valdivia
e3a47d980c Events details component (#1596)
* Events details component

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* lint

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-16 19:33:05 -08:00
Alex
10539929e1 Added quota metric to buckets list & objects list (#1595)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-16 18:58:08 -08:00
Alex
3606870565 Fixed field reset for memory & cpu fields in new tenant size screen (#1593)
Also fixed an issue with memory limit selection in create tenant

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-16 17:28:56 -08:00
Cesar Celis Hernandez
3307d6f282 put id on create tenant button for testing purposes (#1588)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-16 16:51:26 -08:00
adfost
5dc8d1808c Tenant events UI (#1590) 2022-02-16 18:29:41 -06:00
Daniel Valdivia
8d7cddc20a Fix create bucket and list bucket for wildcard statements in policies (#1589)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-16 15:58:34 -08:00
adfost
35f9743a10 tenant events (#1586)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-16 14:22:54 -08:00
jinapurapu
f8c397e231 Update tenant creation credentials JSON (#1559) 2022-02-16 13:52:38 -08:00
Daniel Valdivia
24cf6a3ada Fix Browse Bucket for certain Policy (#1587)
fixes #1320 

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-16 13:20:19 -08:00
Cesar Celis Hernandez
031ee35a00 Add PostgreSQL Notification Test (#1578)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-16 10:23:14 -08:00
Cesar Celis Hernandez
4507ceb36d Allowing distributed mode in MinIO (#1585) 2022-02-16 09:53:34 -08:00
Daniel Valdivia
f6116c1624 Revert "Giving more stability to our testcafe (#1582)" (#1584) 2022-02-16 09:52:03 -07:00
Cesar Celis Hernandez
081df4b535 Add tests for bucket quota end points (#1575) 2022-02-16 09:33:38 -07:00
Cesar Celis Hernandez
e580af8205 Giving more stability to our testcafe (#1582) 2022-02-15 20:58:10 -08:00
Alex
226e8eeef2 Added delete all replication rules capability (#1579) 2022-02-15 17:14:23 -08:00
Cesar Celis Hernandez
00c4ba430d Add test for Delete Object retention from an object end point (#1574) 2022-02-15 18:28:13 -06:00
Prakash Senthil Vel
951d3bf6dc Inspect API (#1540)
* Inspect API

* Address review comments

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-15 16:14:51 -08:00
Daniel Valdivia
3ae8e14156 Release v0.14.6 (#1581)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-15 15:38:16 -08:00
Prakash Senthil Vel
f170a6ad36 License table and registered status (#1571)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-15 13:45:31 -08:00
Daniel Valdivia
25ff4982a0 Fix Upload Button Logic (#1580)
* Fix Upload Button Logic

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* Re-org function hasAccessToResource

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* Fix Warnings

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-15 13:29:09 -08:00
Cesar Celis Hernandez
0ac6ceca3f Adding 4 volumes to run MinIO Distributed on the tests (#1572)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-15 10:01:10 -08:00
Alex
81714bbbed Added lifecycle rules to multiple buckets at once support (#1566)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-15 09:47:28 -08:00
Alex
5b2715ccc0 Added support validation against subpaths to hasPermission & SecureComponent (#1570)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-15 08:25:38 -08:00
dependabot[bot]
ab411577a2 Bump follow-redirects from 1.14.7 to 1.14.8 in /portal-ui (#1567)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-13 21:54:38 -08:00
adfost
dce96ecc4b adding user service account policy edit (#1565)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-02-12 10:25:27 -06:00
Cesar Celis Hernandez
a232d73cb1 Add test for Bucket Set Policy end point (#1562) 2022-02-11 21:55:26 -08:00
Cesar Celis Hernandez
c986baf2ae Add test for Restore Object to a selected version end point (#1558) 2022-02-11 11:49:01 -08:00
Harshavardhana
df55d5dcde simplify policy document in tests use Go verbatim strings (#1549) 2022-02-11 13:26:11 -06:00
Cesar Celis Hernandez
ed5cf89776 Add test for Put Buckets tags end point (#1556) 2022-02-11 10:17:04 -08:00
Cesar Celis Hernandez
fa3f2283cf Add test for Gets the metadata of an object end point (#1555) 2022-02-10 20:09:30 -06:00
adfost
2988de4025 adding edit service account api/ui (#1545)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-02-10 17:18:57 -08:00
Daniel Valdivia
c6f2ddfd7e Release v0.14.5 (#1550)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-10 17:06:43 -08:00
Alex
6a7f042d6c Fixed logic for add lifecycle rules (#1553)
- Removed support to fixed date lifecycle rules according resolution of https://github.com/minio/console/issues/1527

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-10 16:50:27 -08:00
Alex
5fd82ca6e9 Added delete bucket lifecycle rule capability (#1547)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-10 16:25:59 -08:00
Lenin Alevski
829404b33c Fix session.permission npe (#1551)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-02-10 15:45:28 -08:00
Daniel Valdivia
610ec0bed4 Fix NPE on permissions (#1548)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-10 13:45:18 -08:00
Daniel Valdivia
822f063be3 Release v0.14.4 (#1546)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-10 11:25:31 -08:00
Alex
32a3094386 Added lifecycle rule edit capability (#1539)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-10 09:34:56 -08:00
Cesar Celis Hernandez
07ef32bee3 Add test for Put Objects retention status end point (#1542) 2022-02-10 11:24:09 -06:00
Kaan Kabalak
df17d31721 Add Permission tests for policies that only allow specific Buckets (#1538) 2022-02-09 23:21:56 -06:00
Lenin Alevski
302c0dd8f1 Add support for matching multiple resources in SecureComponent (#1536)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-02-09 17:52:17 -08:00
Cesar Celis Hernandez
3d70427e2b Add test for Shares an Object on a url end point (#1535) 2022-02-09 17:42:52 -06:00
Daniel Valdivia
c29ac61ff4 Update Logos colors (#1534)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-09 14:50:10 -06:00
Alex
c8fdadde39 Implemented edit lifecycle API (#1533)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-09 14:30:22 -06:00
Daniel Valdivia
2ffc28a834 Console K Bar (#1532)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-09 11:44:49 -06:00
adfost
75b3082172 Service account policy UI (#1519)
* saving

* service account policy UI

* fixing warning

* Update portal-ui/src/screens/Console/Account/ServiceAccountPolicy.tsx

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* fixing comment

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-02-08 22:52:55 -08:00
Lenin Alevski
7e8441264f Removing date based actions for Lifecycle expiration and transition (#1531) 2022-02-08 16:07:55 -06:00
Kaan Kabalak
b077f2ec22 Handle pluralization for TableWrapper selected text (#1530) 2022-02-08 13:35:31 -06:00
Cesar Celis Hernandez
3262b8fd8f Adding test for service-account-credentials end point (#1528) 2022-02-08 10:39:15 -08:00
jinapurapu
090b7e5e26 Changed HTTP verb to DELETE for DeleteMultipleServiceAccounts (#1526) 2022-02-07 19:51:40 -08:00
Cesar Celis Hernandez
7f05c0bf06 Convert to table driven test (#1506) 2022-02-05 09:26:33 -08:00
Daniel Valdivia
fbb6c81986 Release v0.14.3 (#1520)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-04 20:10:34 -08:00
Kaan Kabalak
9e843f4ba0 Add concurrency argument for Permission testing (#1510)
* Add concurrency argument for Permission testing

* Create group before trying to view table

* Increase wait duration for one of the Diagnostic tests
2022-02-04 09:52:28 -06:00
Harshavardhana
4e14ec2742 update mc/termenv dependency to fix terminal hang (#1518)
refer https://github.com/minio/mc/issues/3955
2022-02-03 22:44:45 -08:00
Alex
69ccf4872e Added virtualized list to pod logs in operator console (#1517)
Also removed some execution time errors
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-03 22:19:17 -08:00
Prakash Senthil Vel
1c31aff147 UX Basic Dashboard (#1513) 2022-02-03 21:34:13 -08:00
Kaan Kabalak
608a5c3787 Fix User name clicked on Groups page redirecting incorrectly (#1516)
Fixes #1515
2022-02-03 19:07:23 -08:00
Lenin Alevski
297c980a8d Read subnet proxy configuration from minio or env var (#1511)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-02-03 10:04:35 -08:00
Alex
4091b11f99 Fixed Node Selector reset in Pod placement (#1512) 2022-02-03 08:41:35 -08:00
Harshavardhana
4718380bd2 update termenv dependency to avoid CI/CD terminal hangs (#1507) 2022-02-02 23:14:11 -08:00
Alex
52ea19809e Customized calendar & time pickers for DateTimePicker component (#1508)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-02 23:21:46 -06:00
dependabot[bot]
281bd78104 Bump nanoid from 3.1.30 to 3.2.0 in /portal-ui (#1509)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.30 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.30...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 21:30:38 -06:00
Daniel Valdivia
d84e744d05 Update UI Dependencies (#1505)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-02-02 18:38:20 -08:00
Harshavardhana
1b5bcad3d8 update missing base image update to ubi-8.5 2022-02-02 13:20:05 -08:00
Daniel Valdivia
bfc4b138ff Update unit test list buckets (#1482)
Update unit test list buckets
2022-02-02 12:28:03 -08:00
Lenin Alevski
5a0ec11199 Updating node image and go image in Dockerfile (#1504)
- Updating node image to 17
- Updating go image to 1.17

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-02-02 13:44:43 -06:00
Cesar Celis Hernandez
c52ba1f859 Test to delete multiple objects (#1479) 2022-02-02 13:29:43 -06:00
Cesar Celis Hernandez
d62235ee58 Add test for listing an object (#1484)
* Add test for listing an object

* Add test for listing an object
2022-02-02 13:06:01 -06:00
jinapurapu
e5d2752436 Added multidelete function for Service Accounts (#1501)
Added multidelete function for Service Accounts
2022-02-02 10:21:56 -08:00
Harshavardhana
cffaee84bb upgrade console container base image to ubi-8.5 (#1503) 2022-02-02 08:53:13 -08:00
Alex
96b1d4fe85 Added bucket details inside objects listing (#1502)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-02-01 20:48:58 -08:00
Cesar Celis Hernandez
02acb76ac9 Add test for Bulk functionality to Add Users to Groups (#1495)
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-02-01 08:42:09 -08:00
Harshavardhana
038f542895 go mod tidy -compat=1.17 2022-01-31 23:39:28 -08:00
Daniel Valdivia
983e175bc9 Release v0.14.2 (#1499)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-31 23:33:57 -08:00
Alex
71ac8d7001 Replaced top breadcrumbs & redesign of bucket breadcrumbs (#1498) 2022-01-31 23:40:23 -07:00
jinapurapu
5258ac3d1a Logging resources selector (#1402)
Added CPU and memory request selector to Log and Log DB
2022-01-31 21:17:21 -08:00
Daniel Valdivia
27d1627c8f Show Warnings when running speed test or diagnostics (#1487)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-01-31 20:41:02 -08:00
Alex
780cf7240b Changed position of search box for list objects module (#1497)
- Changed the searchbox component to be a controlled component
- Added reducer to control searchbox in objects list
- Adjusted styles to search box component & placeholders
- Fixed navigation of folders

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-31 19:46:57 -08:00
Cesar Celis Hernandez
ce989e39ab Add test to add tag to an object (#1481) 2022-01-31 20:46:40 -06:00
adfost
63d3c7207d Service Account Policy API (#1425)
* service account policy

* integration test

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-31 13:37:00 -08:00
Lenin Alevski
eb924ec842 testscafe test for upload file button on bucket (#1491)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-01-31 12:00:33 -08:00
Lenin Alevski
f826453284 Fix duplicated Documentation item in Menu (#1494)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-01-31 13:53:49 -06:00
Harshavardhana
1e00111b00 remove quota FIFO support (#1492) 2022-01-31 11:10:06 -06:00
Cesar Celis Hernandez
06e1592b54 Added test for downloading an object (#1480) 2022-01-31 10:25:35 -06:00
Alex
41e0c1e39b Fixed EC Parity field reset during tab change (#1490) 2022-01-29 16:28:57 -06:00
Alex
31f63a387e Added object details panel (#1489)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-28 20:05:23 -08:00
Cesar Celis Hernandez
4a1ccf19a0 Removing unused parameters (#1465) 2022-01-28 21:24:53 -06:00
Lenin Alevski
d8b387434b Enable/Disable upload file and folder button for bucket (#1486) 2022-01-28 14:16:38 -08:00
Cesar Celis Hernandez
2e9a42320c Test to delete object (#1477) 2022-01-28 12:01:38 -06:00
Prakash Senthil Vel
1d92f90cbe UX Register screen (#1485) 2022-01-28 09:08:32 -08:00
Harshavardhana
df728fc8e6 update madmin-go (#1483) 2022-01-27 23:57:30 -07:00
Cesar Celis Hernandez
834e3fb996 Add test to upload an object (#1473)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-27 21:51:13 -08:00
Cesar Celis Hernandez
0b7d4a2c35 Add delete bucket test (#1457)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-27 17:56:09 -08:00
Cesar Celis Hernandez
e13626e92b Add new test for service account for user (#1469)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-27 17:31:13 -08:00
Lenin Alevski
0286010053 Fix regression on disabled elements for SecureComponent (#1478)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-01-27 13:10:05 -08:00
Harshavardhana
382e315668 remove an unnecessary log in subnet pkg (#1471)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-01-27 13:27:44 -06:00
Prakash Senthil Vel
5f5c00adb5 UX Diagnostic icon (#1474) 2022-01-27 12:47:42 -06:00
Prakash Senthil Vel
e093efa931 UX Object Details page (#1475)
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-01-27 09:23:21 -08:00
Alex
c129eae6a7 Bucket objects listing menu redesign (#1467)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-27 00:28:08 -08:00
Daniel Valdivia
5b6e5786ea Release v0.14.1 (#1472)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-26 19:24:36 -08:00
Lenin Alevski
8a8471e49a Support multiple child components for SecureComponent (#1470)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-01-26 16:59:12 -08:00
Lenin Alevski
719866a574 Fix broken link on license page (#1468)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-01-26 15:59:07 -08:00
Cesar Celis Hernandez
95ebc3bedf add test to modify users group (#1462)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-26 11:38:14 -08:00
Daniel Valdivia
a8747614bf Release v0.14.0 (#1458)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-26 11:06:18 -08:00
Daniel Valdivia
c89f5a7003 Tweaks to registration. (#1463)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-26 10:21:53 -08:00
Daniel Valdivia
ebcebfbe5f Update MUI to v5.3.1 (#1464)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-26 12:12:16 -06:00
Lenin Alevski
c82782fe9f Adding support for configuring subnet proxy (#1460)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-01-26 09:53:11 -08:00
Cesar Celis Hernandez
e626f59feb Add bucket retention test (#1459)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-01-25 16:33:54 -08:00
adfost
cc8d5abcd6 Adding PVC events UI (#1448)
* adding PVC events UI

* adding label

Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-25 14:02:50 -08:00
Daniel Valdivia
83a4c351dd Fix diagnostics tests (#1456)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-25 13:24:19 -08:00
Cesar Celis Hernandez
4c0c46f5a8 Adding Bucket Info Test (#1446)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-01-25 12:16:51 -08:00
Daniel Valdivia
1842caff0f Fix secure component having multiple childs (#1455)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-25 11:49:39 -08:00
Lenin Alevski
80d3e8cdb8 Menu scrollbar css styles (#1454)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-25 10:58:29 -08:00
Harshavardhana
d936d61b20 add header linter to avoid license header mistakes (#1414)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-25 10:48:49 -08:00
adfost
4a10a81374 Delete Pod UI (#1381)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-25 10:33:51 -08:00
Cesar Celis Hernandez
6404a1b984 Add test for removing a user (#1450)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-25 10:23:25 -08:00
Prakash Senthil Vel
a3dc145738 UX navigation menu selected state (#1452)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-01-25 10:07:41 -08:00
Alex
dbd1b8781a Fix aria for upload file button (#1451) 2022-01-25 00:26:48 -07:00
adfost
9e7874cc04 PVC Events API (#1409)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-01-24 17:07:32 -08:00
Alex
d1d3c96777 Added Upload Files menu (#1447)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-24 16:53:47 -08:00
Daniel Valdivia
2d975eb6c9 Remove Duck hidden in code (#1445)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-24 15:53:23 -08:00
Daniel Valdivia
be054fe4ce License Page UI Updates (#1444)
* License Page UI Updates

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* Lint

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-24 17:40:38 -06:00
Daniel Valdivia
f27902ab92 Have tests create their buckets via minio-js (#1443)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-24 11:13:32 -08:00
Cesar Celis Hernandez
7e43719e20 Update User Information Test (#1442)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-24 10:09:27 -08:00
Daniel Valdivia
f6016c2769 Menu Adjustments: Watch to Monitoring. Tiers to Settings. Notifications to Settings. (#1436)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2022-01-24 09:56:16 -08:00
Cesar Celis Hernandez
0ba60bd674 Add test for listing buckets (#1440) 2022-01-24 11:27:32 -06:00
Lenin Alevski
41b34645f9 Subnet cluster registration (#1338)
- Removed old registration flow
- Add support for new online and offline cluster registration flow
- Support login accounts with mfa enabled
- Registration screens

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-01-23 21:42:00 -08:00
Cesar Celis Hernandez
ceff2840d8 Add get user info test (#1438)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-22 20:58:51 -08:00
Alex
6541938f16 Added TableRow customized style option (#1437) 2022-01-22 12:26:16 -08:00
Cesar Celis Hernandez
276eff4f15 Add list user test (#1435) 2022-01-21 21:54:36 -06:00
Daniel Valdivia
a3c9d0fe59 Loading component for suspense loaded screens (#1434)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-21 18:57:35 -06:00
Cesar Celis Hernandez
14f032971b Improving bucket tests in Console API (#1430) 2022-01-21 18:41:19 -06:00
Daniel Valdivia
9b9c54f775 Tweak some headers with the new names (#1433)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-21 15:57:43 -08:00
Kaan Kabalak
a778a1eaf9 Fix failing tests and remove sleep statement for GitHub Actions (#1432) 2022-01-21 15:21:28 -08:00
Alex
5f281518fc Added fallback to root testing (#1431) 2022-01-21 13:31:29 -08:00
Prakash Senthil Vel
ca7fa30aa8 UX form field label style (#1428) 2022-01-21 14:27:56 -06:00
Cesar Celis Hernandez
df4c63e2a3 Make bucket Integration Test (#1424)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
2022-01-21 10:20:30 -08:00
Cesar Celis Hernandez
51ce548a00 Add User Integration Test #414 (#1417) 2022-01-20 21:49:54 -06:00
Daniel Valdivia
7aa8217ee7 Adding cache to test (#1426)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-20 21:31:16 -06:00
Alex
a926082e4d Updated speedtest behavior (#1427)
- Allowed object size changed in autotune mode
- Removed "Please wait while we get x results... "
- Reorganized advanced options form

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-20 18:44:55 -08:00
adfost
3ba7b34b25 Delete all versions (#1376)
* delete all versions

* style

Co-authored-by: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-20 17:28:52 -08:00
Daniel Valdivia
d9531f9617 Fix the Admin UI Tests (#1423)
* Fix the Admin UI Tests

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* concurrency

* Fix heal tests

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* fix Logs and trace

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* Fix tests that weren't passing

* concurrency

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Kaan Kabalak <kaan@minio.io>
2022-01-20 16:50:52 -08:00
Prakash Senthil Vel
18c14cc452 UX menu redesign (#1415)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-20 10:08:00 -08:00
Daniel Valdivia
1e7a5647dd Release v0.13.3 (#1416)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-20 00:14:17 -08:00
Alex
7edab62651 Added new features to bucket replication rules panel (#1412)
- Added Edit option for replication
- Sorted by priority in replication list
- Fixed an issue where storage class was not saved for replication rule
- Added metadata replication selector to both add & edit windows

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-19 23:29:57 -08:00
Alex
9e9321ab00 Fixed issue where storage class resets when changing between tabs (#1418)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-19 23:23:40 -06:00
Harshavardhana
3caa9a8e38 separate operator binary code to reduce binary size (#1314)
remove logsearchapi dependency, no definitive struct
marshalling is needed since UI is schemaless for
search response.
2022-01-19 11:13:26 -08:00
Daniel Valdivia
02b6add514 Make view button for tenant available regardless of it being online (#1411)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-18 21:27:34 -06:00
Prakash Senthil Vel
67574ff92e Fix access rule edit name display for the default prefix (#1404) 2022-01-17 13:20:39 -06:00
Cesar Celis Hernandez
158c231858 Update Integration tests on console to build MinIO latest (#1398) 2022-01-15 09:24:54 -08:00
Kaan Kabalak
479fa34542 Automate end-to-end permission testing (#1383)
Automate permission testing
2022-01-14 17:04:40 -08:00
Daniel Valdivia
0ba5db58ec Rework Monitoring and Loggins edit forms (#1399)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-14 17:51:06 -06:00
Harshavardhana
a15456896b remove frivolous printing on terminal (#1400)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-14 14:50:42 -08:00
jinapurapu
e374772fc6 Added Prometheus monitoring CPU and memory selector. (#1387)
* Added Prometheus monitoring CPU and memory selector.

* Minor text fixes

* Fixed memory units, improvements to get return

* Updated logic to add storageClassName to get response

* Minor fixes, removed warnings

* Removed blank entry for empty storageclassname

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-14 11:15:09 -08:00
Alex
257f02c554 Added priority selector to add replication screen (#1396)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-14 10:33:37 -08:00
Daniel Valdivia
826cb41392 Fix for issue #1390 caused by secure component having multiple childs (#1394)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-14 12:22:01 -06:00
Prakash Senthil Vel
dcfc74ad0b UX Button for page actions (#1392)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-13 13:55:30 -06:00
Cesar Celis Hernandez
5745137a34 updating operator in console (#1393)
Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
2022-01-13 11:10:05 -08:00
Harshavardhana
3adc4cb0d4 update console to releave v7.0.21 (#1391) 2022-01-12 20:26:10 -08:00
Daniel Valdivia
fb74ac2601 Detect basename for react router (#1384)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-12 19:04:08 -08:00
Daniel Valdivia
d269cfcd31 Update go-swagger and go-openapi dependencies (#1385)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-12 18:59:14 -08:00
Cesar Celis Hernandez
1871f2bf9e to fail test when yarn does not build (#1388)
* to fail test when yarn does not build

* Warnings cleanup (#1389)

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>

* to fail test when yarn does not build

Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-12 16:57:50 -08:00
Alex
c386040f99 Warnings cleanup (#1389)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-12 16:48:43 -08:00
Alex
583111fa9b Added virtualized render to buckets & tenants lists (#1386)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-12 15:14:24 -08:00
Prakash Senthil Vel
6448a8e821 UX service account and settings (#1374)
* UX service account and settings

* Update icon and color
2022-01-12 11:53:47 -06:00
Daniel Valdivia
2e7d8d3642 Tweaks to Tenant Details for Logging and Monitoring (#1382)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-11 20:23:17 -08:00
jinapurapu
6527bd02e8 Added informative message for 413 error file too large (#1379) 2022-01-11 19:45:14 -08:00
adfost
0400e0c6d5 Tenant Logs (#1140)
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
2022-01-11 15:18:31 -08:00
adfost
3a0a2b14d9 Chinese Filename Bug Fix (#1366) 2022-01-11 15:11:47 -08:00
adfost
9997afeedc Delete PVC API commit (#1378)
* Delete PVC API commit

* Delete install_nvm.sh
2022-01-11 14:28:15 -06:00
Daniel Valdivia
b026baee34 Fix bug on opertator UI where metrics was showing the menu (#1377)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-11 13:55:06 -06:00
Lenin Alevski
5ee3ef4fe4 Validate requests to logSearchApi endpoint (#1375)
- Previously any user with a validate session in console could query the
  `/api/v1/logs/search` endpoint which was not ideal, now we are
  limiting that to users with the `admin:OBDInfo` iam action
- Removing deprecated `has-permission` endpoint and backend code

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-01-11 11:08:30 -08:00
Alex
c90094e328 Updated react-scripts version to 5.0.0 (#1372)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-01-10 11:35:35 -08:00
Harshavardhana
ef1dc172fd add '/' implicitly to console_subpath (#1371) 2022-01-08 20:56:54 -08:00
Daniel Valdivia
eadc449bb0 Fail PR if Warnings are present in React Code (#1348) 2022-01-07 10:29:44 -08:00
Harshavardhana
8c63d6dd4a skip failing subnet JWT tests 2022-01-06 21:23:26 -08:00
Daniel Valdivia
40c3161416 Report N/A when usage is not yet known (#1369)
* Report N/A when usage is not yet known

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* lint

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-06 21:17:20 -08:00
Daniel Valdivia
ef2d2875b2 Small Tweaks to Tiers List (#1368) 2022-01-06 10:02:45 -08:00
Prakash Senthil Vel
2310865425 UX Tiers (#1367) 2022-01-06 08:13:20 -08:00
Daniel Valdivia
4649e1697b Release v0.13.2 (#1362)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-03 22:02:23 -08:00
Prakash Senthil Vel
b9ddadf9ce UX Bucket summary (#1355) 2022-01-03 21:30:38 -08:00
Kanagaraj M
eae9f46ac4 add gcp marketplace server configurations (#1361) 2022-01-03 19:07:02 -08:00
Daniel Valdivia
68ffd0814b Rework Tenant Details as two columns (#1360)
* Rework Tenant Details as two columns

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* remove placeholder

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-01-03 18:42:21 -08:00
Prakash Senthil Vel
9b12f5a41e UX left sidebar menu (#1356) 2022-01-03 18:26:32 -08:00
jinapurapu
dd781dc6da Configure tenant monitoring tab (#1295)
* Configure tenant monitoring tab rework on new branch

* Removed unneeded code

* Fixed empty value bug

* rebased to master

* Configure tenant monitoring tab rework on new branch

* Removed unneded imports, commented lines

* Removed endpoints.go

* Rebased to master and modified to work without endpoints.go

* Removed unused function
2022-01-03 16:43:41 -08:00
Anis Elleuch
0cfa6f774b Add Azure marketplace VM choices (#1358)
Add Azure VM configurations for the marketplace option
2022-01-03 16:31:12 -08:00
Anis Elleuch
13a5a7186c Use default storage class for postgre/prometheus if not user specified (#1359)
Currently we are using empty string as storage class for postgre and
prometheus pods when the user does not provide any value. However any
empty value as storage class has a special meaning in Kubernetes:

```
If storageClassName is set to an empty string ('') in the PVC, no
storage class will be used (i.e.; dynamic provisioning is disabled for
this PVC)

Existing, “Available”, PVs (that do not have a specified storageClassName)
will be considered for binding to the PVC.
```

This commit will avoid setting the storage class in the PVC declaration,
so the default storage class will be used.
2022-01-03 16:29:27 -08:00
Harshavardhana
fc5cf8aeac update dependencies for selfupdate to v0.4.0 2022-01-03 11:58:18 -08:00
adfost
591440880c enable versioning if locking (#1350) 2022-01-02 22:59:02 -08:00
Alex
ac64eedc14 Renamed marketplace functions (#1354)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-30 18:08:13 -08:00
Lenin Alevski
b04ea490f8 Fix object name in object manager (#1353)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-12-30 16:56:06 -08:00
Alex
5373e1dc19 Added initial AWS Marketplace support to operator console (#1347)
* Added initial AWS Marketplace support to operator console

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

* Renamed interface

* Removed resources request in tenant request.

* Destructured map state in Tenant Size

* Resource Validations

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

* Removed ecparity set default option

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-30 16:43:28 -08:00
Daniel Valdivia
7410fdbcc9 Chain Upload Folders with Promises (#1352) 2021-12-30 14:34:33 -08:00
jinapurapu
3f4b595779 Improved folder drop upload behavior (#1331) 2021-12-30 15:43:33 -06:00
Prakash Senthil Vel
3d357c8c22 Tab UX colors (#1349) 2021-12-30 11:22:36 -08:00
adfost
b2f38200f7 Custom Policies for Buckets (#1332)
* custom policies

* fixing error

* add formatting
2021-12-28 20:21:29 -06:00
Prakash Senthil Vel
10b8a93b5e UX Tenant summary screen (#1346) 2021-12-28 13:37:23 -06:00
2848 changed files with 165503 additions and 372610 deletions

48
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,48 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: community, triage
assignees: ''
---
## NOTE
If this case is urgent, please subscribe to [Subnet](https://min.io/pricing) so that our 24/7 support team may help you faster.
<!--- Provide a general summary of the issue in the title above -->
## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->
## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->
## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Regression
<!-- Is this issue a regression? (Yes / No) -->
<!-- If Yes, optionally please include the MinIO version or commit id or PR# that caused this regression, if you have these details. -->
## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* MinIO version used (`minio --version`):
* Server setup and configuration:
* Operating System and version (`uname -a`):

View File

@@ -1,34 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Compiles on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make console

166
.github/workflows/cross-compile.yaml vendored Normal file
View File

@@ -0,0 +1,166 @@
# @format
name: Cross Compile
on:
pull_request:
branches:
- master
paths:
- go.sum
# This ensures that previous jobs for the PR are canceled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
cross-compile-1:
name: Cross compile
needs:
- lint-job
- ui-assets
- reuse-golang-dependencies
- semgrep-static-code-analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.20.x ]
os: [ ubuntu-latest ]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'linux/ppc64le linux/mips64'"
cross-compile-2:
name: Cross compile 2
needs:
- lint-job
- ui-assets
- reuse-golang-dependencies
- semgrep-static-code-analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.20.x ]
os: [ ubuntu-latest ]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'linux/arm64 linux/s390x'"
cross-compile-3:
name: Cross compile 3
needs:
- lint-job
- ui-assets
- reuse-golang-dependencies
- semgrep-static-code-analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.20.x ]
os: [ ubuntu-latest ]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'darwin/amd64 freebsd/amd64'"
cross-compile-4:
name: Cross compile 4
needs:
- lint-job
- ui-assets
- reuse-golang-dependencies
- semgrep-static-code-analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.20.x ]
os: [ ubuntu-latest ]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'windows/amd64 linux/arm'"
cross-compile-5:
name: Cross compile 5
needs:
- lint-job
- ui-assets
- reuse-golang-dependencies
- semgrep-static-code-analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.20.x ]
os: [ ubuntu-latest ]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
id: go
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'linux/386 netbsd/amd64'"

View File

@@ -1,34 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Cross compile
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'linux/ppc64le linux/mips64'"

View File

@@ -1,34 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Cross compile
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'linux/arm64 linux/s390x'"

View File

@@ -1,34 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Cross compile
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'darwin/amd64 freebsd/amd64'"

View File

@@ -1,34 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Cross compile
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'windows/amd64 linux/arm'"

View File

@@ -1,34 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Cross compile
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make crosscompile arg1="'linux/386 netbsd/amd64'"

View File

@@ -1,34 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Test Pkg on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make test-pkg

View File

@@ -1,34 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Test Restapi on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make test

View File

@@ -1,38 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
# This ensures that previous jobs for the PR are canceled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
minio-test:
name: Integration Tests with Latest Distributed MinIO
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.17.x]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
run: |
make test-integration

18
.github/workflows/issues.yaml vendored Normal file
View File

@@ -0,0 +1,18 @@
# @format
name: Issue Workflow
on:
issues:
types:
- opened
jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.5.0
with:
project-url: https://github.com/orgs/miniohq/projects/2
github-token: ${{ secrets.BOT_PAT }}

1301
.github/workflows/jobs.yaml vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,34 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Checking Lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make verifiers

View File

@@ -1,15 +0,0 @@
name: "React Tests"
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
working-directory: ./portal-ui
run: yarn
- name: Run tests
working-directory: ./portal-ui
run: yarn test

11
.gitignore vendored
View File

@@ -1,3 +1,13 @@
# Playwright Data
portal-ui/storage/
portal-ui/playwright/.auth/admin.json
# Report from Playwright
portal-ui/playwright-report/
# Coverage from Playwright
portal-ui/.nyc_output/
# Binaries for programs and plugins
*.exe
*.exe~
@@ -19,6 +29,7 @@ vendor/
# Ignore executables
target/
!pkg/logger/target/
console
!console/

View File

@@ -5,34 +5,45 @@ linters-settings:
misspell:
locale: US
goheader:
values:
regexp:
copyright-holder: Copyright \(c\) (20\d\d\-20\d\d)|2021|({{year}})
template-path: .license.tmpl
linters:
disable-all: true
enable:
- typecheck
- goimports
- misspell
- govet
- revive
- ineffassign
- gosimple
- deadcode
- unparam
- gomodguard
- gofmt
- unused
- structcheck
- staticcheck
- unconvert
- gocritic
- gofumpt
- durationcheck
service:
golangci-lint-version: 1.27.0 # use the fixed version to not introduce new linters unexpectedly
golangci-lint-version: 1.43.0 # use the fixed version to not introduce new linters unexpectedly
issues:
exclude-use-default: false
exclude:
- should have a package comment
# TODO(y4m4): Remove once all exported ident. have comments!
- comment on exported function
- comment on exported type
- should have comment
- use leading k in Go names
- comment on exported const
- should have a package comment
# TODO(y4m4): Remove once all exported ident. have comments!
- comment on exported function
- comment on exported type
- should have comment
- use leading k in Go names
- comment on exported const
run:
skip-dirs:
- pkg/clientgen
- pkg/apis/networking.gke.io
- restapi/operations

View File

@@ -1,195 +0,0 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: console
release:
name_template: "Release version {{.Tag}}"
github:
owner: minio
name: console
extra_files:
- glob: "*.minisig"
before:
hooks:
# you may remove this if you don't use vgo
- go mod tidy
builds:
-
goos:
- linux
- darwin
- windows
goarch:
- amd64
- ppc64le
- s390x
- arm64
ignore:
- goos: darwin
goarch: arm
- goos: windows
goarch: arm64
- goos: windows
goarch: arm
env:
- CGO_ENABLED=0
main: ./cmd/console/
flags:
- -trimpath
- --tags=kqueue
ldflags:
- -s -w -X github.com/minio/console/pkg.ReleaseTag={{.Tag}} -X github.com/minio/console/pkg.CommitID={{.FullCommit}} -X github.com/minio/console/pkg.Version={{.Version}} -X github.com/minio/console/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/console/pkg.ReleaseTime={{.Date}}
archives:
-
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
format: binary
replacements:
arm: arm
signs:
-
signature: "${artifact}.minisig"
cmd: "sh"
args:
- '-c'
- 'minisign -s /media/${USER}/minio/minisign.key -Sm ${artifact} < /media/${USER}/minio/minisign-passphrase'
artifacts: all
snapshot:
name_template: v0.0.0@{{.ShortCommit}}
changelog:
sort: asc
nfpms:
-
vendor: MinIO, Inc.
homepage: https://github.com/minio/console
maintainer: MinIO Development <dev@min.io>
description: MinIO Console Server
license: GNU Affero General Public License v3.0
formats:
- deb
- rpm
contents:
# Basic file that applies to all packagers
- src: systemd/console.service
dst: /etc/systemd/system/minio-console.service
dockers:
- image_templates:
- "minio/console:{{ .Tag }}-amd64"
use: buildx
goarch: amd64
dockerfile: Dockerfile.release
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/console:{{ .Tag }}-ppc64le"
use: buildx
goarch: ppc64le
dockerfile: Dockerfile.release
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/ppc64le"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/console:{{ .Tag }}-s390x"
use: buildx
goarch: s390x
dockerfile: Dockerfile.release
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/s390x"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/console:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
goos: linux
dockerfile: Dockerfile.release
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/console:{{ .Tag }}-amd64"
use: buildx
goarch: amd64
dockerfile: Dockerfile.release
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/console:{{ .Tag }}-ppc64le"
use: buildx
goarch: ppc64le
dockerfile: Dockerfile.release
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/ppc64le"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/console:{{ .Tag }}-s390x"
use: buildx
goarch: s390x
dockerfile: Dockerfile.release
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/s390x"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/console:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
goos: linux
dockerfile: Dockerfile.release
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=TAG={{ .Tag }}"
docker_manifests:
- name_template: minio/console:{{ .Tag }}
image_templates:
- minio/console:{{ .Tag }}-amd64
- minio/console:{{ .Tag }}-arm64
- minio/console:{{ .Tag }}-ppc64le
- minio/console:{{ .Tag }}-s390x
- name_template: quay.io/minio/console:{{ .Tag }}
image_templates:
- quay.io/minio/console:{{ .Tag }}-amd64
- quay.io/minio/console:{{ .Tag }}-arm64
- quay.io/minio/console:{{ .Tag }}-ppc64le
- quay.io/minio/console:{{ .Tag }}-s390x
- name_template: minio/console:latest
image_templates:
- minio/console:{{ .Tag }}-amd64
- minio/console:{{ .Tag }}-arm64
- minio/console:{{ .Tag }}-ppc64le
- minio/console:{{ .Tag }}-s390x

15
.license.tmpl Normal file
View File

@@ -0,0 +1,15 @@
This file is part of MinIO Console Server
{{copyright-holder}} MinIO, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
18

35
.semgrepignore Normal file
View File

@@ -0,0 +1,35 @@
# Ignore git items
.gitignore
.git/
:include .gitignore
# Common large paths
node_modules/
portal-ui/node_modules/
build/
dist/
.idea/
vendor/
.env/
.venv/
.tox/
*.min.js
# Common test paths
test/
tests/
*_test.go
# Semgrep rules folder
.semgrep
# Semgrep-action log folder
.semgrep_logs/
# Ignore VsCode files
.vscode/
*.code-workspace
*~
.eslintcache
consoleApi.ts

44
CHANGELOG.md Normal file
View File

@@ -0,0 +1,44 @@
<!-- @format -->
# Changelog
## Release v0.32.0
Features:
- Updated Users and Groups components
- Added placeholder image for Help Menu
Bug Fix:
- Fixed memory leak in WebSocket API for Object Browser
---
## Release v0.31.0
*Breaking Changes:*
- *Removed support for Standalone Deployments*
Features:
- Updated way files are displayed in uploading component
- Updated Audit Logs and Policies components
Bug Fix:
- Fixed Download folders issue in Object Browser
- Added missing Notification Events (ILM & REPLICA) in Events Notification Page
- Fixed Security Vulnerability for `semver` dependency
---
## Release v0.30.0
Features:
- Added MinIO Console Help Menu
- Updated UI Menu components
Bug Fix:
- Disable the Upload button on Object Browser if the user is not allowed
- Fixed security vulnerability for `lestrrat-go/jwx` and `fast-xml-parser`
- Fixed bug on sub-paths for Object Browser
- Reduce the number of calls to `/session` API endpoint to improve performance
- Rolled back the previous change for the Share File feature to no longer ask for Service Account access keys

19591
CREDITS

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,96 @@
# Developing MinIO Console
The MinIO Console requires the [MinIO Server](https://github.com/minio/minio). For development purposes, you also need to run both the MinIO Console web app and the MinIO Console server.
## Running MinIO Console server
Build the server in the main folder by running:
```
make
```
> Note: If it's the first time running the server, you might need to run `go mod tidy` to ensure you have all modules required.
To start the server run:
```
CONSOLE_ACCESS_KEY=<your-access-key>
CONSOLE_SECRET_KEY=<your-secret-key>
CONSOLE_MINIO_SERVER=<minio-server-endpoint>
CONSOLE_DEV_MODE=on
./console server
```
## Running MinIO Console web app
Refer to `/portal-ui` [instructions](/portal-ui/README.md) to run the web app locally.
# Building with MinIO
To test console in its shipping format, you need to build it from the MinIO repository, the following step will guide
you to do that.
### 0. Building with UI Changes
If you are performing changes in the UI components of console and want to test inside the MinIO binary, you need to
build assets first.
In the console folder run
```shell
make assets
```
This will regenerate all the static assets that will be served by MinIO.
### 1. Clone the `MinIO` repository
In the parent folder of where you cloned this `console` repository, clone the MinIO Repository
```shell
git clone https://github.com/minio/minio.git
```
### 2. Update `go.mod` to use your local version
In the MinIO repository open `go.mod` and after the first `require()` directive add a `replace()` directive
```
...
)
replace (
github.com/minio/console => "../console"
)
require (
...
```
### 3. Build `MinIO`
Still in the MinIO folder, run
```shell
make build
```
# Testing on Kubernetes
If you want to test console on kubernetes, you can perform all the steps from `Building with MinIO`, but change `Step 3`
to the following:
```shell
TAG=miniodev/console:dev make docker
```
This will build a docker container image that can be used to test with your local kubernetes environment.
For example, if you are using kind:
```shell
kind load docker-image miniodev/console:dev
```
and then deploy any `Tenant` that uses this image
# LDAP authentication with Console
## Setup
@@ -15,7 +108,8 @@ $ docker cp console/docs/ldap/billy.ldif my-openldap-container:/container/servic
$ docker exec my-openldap-container ldapadd -x -D "cn=admin,dc=example,dc=org" -w admin -f /container/service/slapd/assets/test/billy.ldif -H ldap://localhost
```
Query the ldap server to check the user billy was created correctly and got assigned to the consoleAdmin group, you should get a list
Query the ldap server to check the user billy was created correctly and got assigned to the consoleAdmin group, you
should get a list
containing ldap users and groups.
```
@@ -30,7 +124,7 @@ $ docker exec my-openldap-container ldapsearch -x -H ldap://localhost -b uid=bil
### Change the password for user billy
Set the new password for `billy` to `minio123` and enter `admin` as the default `LDAP Password`
Set the new password for `billy` to `minio123` and enter `admin` as the default `LDAP Password`
```
$ docker exec -it my-openldap-container /bin/bash
@@ -41,6 +135,7 @@ Enter LDAP Password:
```
### Add the consoleAdmin policy to user billy on MinIO
```
$ cat > consoleAdmin.json << EOF
{
@@ -66,8 +161,8 @@ $ cat > consoleAdmin.json << EOF
]
}
EOF
$ mc admin policy add myminio consoleAdmin consoleAdmin.json
$ mc admin policy set myminio consoleAdmin user="uid=billy,dc=example,dc=org"
$ mc admin policy create myminio consoleAdmin consoleAdmin.json
$ mc admin policy attach myminio consoleAdmin --user="uid=billy,dc=example,dc=org"
```
## Run MinIO

View File

@@ -1,4 +1,5 @@
FROM node:14 as uilayer
ARG NODE_VERSION
FROM node:$NODE_VERSION as uilayer
WORKDIR /app
@@ -12,7 +13,7 @@ RUN make build-static
USER node
FROM golang:1.16 as golayer
FROM golang:1.19 as golayer
RUN apt-get update -y && apt-get install -y ca-certificates
@@ -29,9 +30,9 @@ WORKDIR /go/src/github.com/minio/console/
ENV CGO_ENABLED=0
COPY --from=uilayer /app/build /go/src/github.com/minio/console/portal-ui/build
RUN go build -ldflags "-w -s" -a -o console ./cmd/console
RUN go build --tags=kqueue,operator -ldflags "-w -s" -a -o console ./cmd/console
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7
MAINTAINER MinIO Development "dev@min.io"
EXPOSE 9090

View File

@@ -1,4 +1,5 @@
FROM node:14 as uilayer
ARG NODE_VERSION
FROM node:$NODE_VERSION as uilayer
WORKDIR /app

View File

@@ -1,9 +1,17 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/ubi-minimal:8.7 as build
ARG TAG
RUN microdnf update --nodocs && microdnf install ca-certificates --nodocs
RUN curl -s -q https://raw.githubusercontent.com/minio/kes/master/LICENSE -o LICENSE
RUN curl -s -q https://raw.githubusercontent.com/minio/kes/master/CREDITS -o CREDITS
COPY CREDITS /licenses/CREDITS
COPY LICENSE /licenses/LICENSE
FROM registry.access.redhat.com/ubi8/ubi-micro:8.7
# On RHEL the certificate bundle is located at:
# - /etc/pki/tls/certs/ca-bundle.crt (RHEL 6)
# - /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem (RHEL 7)
COPY --from=build /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/pki/ca-trust/extracted/pem/
COPY --from=build LICENSE /LICENSE
COPY --from=build CREDITS /CREDITS
LABEL name="MinIO" \
vendor="MinIO Inc <dev@min.io>" \
@@ -13,10 +21,6 @@ LABEL name="MinIO" \
summary="A graphical user interface for MinIO" \
description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads."
RUN \
microdnf update --nodocs && \
microdnf install ca-certificates --nodocs
EXPOSE 9090
COPY console /console

214
Makefile
View File

@@ -4,6 +4,9 @@ GOPATH := $(shell go env GOPATH)
BUILD_VERSION:=$(shell git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/null || git rev-parse --abbrev-ref HEAD 2>/dev/null)
BUILD_TIME:=$(shell date 2>/dev/null)
TAG ?= "minio/console:$(BUILD_VERSION)-dev"
MINIO_VERSION ?= "quay.io/minio/minio:latest"
TARGET_BUCKET ?= "target"
NODE_VERSION := $(shell cat .nvmrc)
default: console
@@ -12,23 +15,15 @@ console:
@echo "Building Console binary to './console'"
@(GO111MODULE=on CGO_ENABLED=0 go build -trimpath --tags=kqueue --ldflags "-s -w" -o console ./cmd/console)
k8sdev:
@docker build -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' .
@kind load docker-image $(TAG)
@echo "Done, now restart your console deployment"
getdeps:
@mkdir -p ${GOPATH}/bin
@which golangci-lint 1>/dev/null || (echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.40.1)
@echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin
verifiers: getdeps fmt lint
fmt:
@echo "Running $@ check"
@GO111MODULE=on gofmt -d restapi/
@GO111MODULE=on gofmt -d pkg/
@GO111MODULE=on gofmt -d cmd/
@GO111MODULE=on gofmt -d cluster/
@(env bash $(PWD)/verify-gofmt.sh)
crosscompile:
@(env bash $(PWD)/cross-compile.sh $(arg1))
@@ -43,36 +38,205 @@ install: console
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/console $(GOPATH)/bin/console
@echo "Installation successful. To learn more, try \"console --help\"."
swagger-gen: clean-swagger swagger-console swagger-operator
swagger-gen: clean-swagger swagger-console apply-gofmt
@echo "Done Generating swagger server code from yaml"
apply-gofmt:
@echo "Applying gofmt to all generated an existing files"
@GO111MODULE=on gofmt -w .
clean-swagger:
@echo "cleaning"
@rm -rf models
@rm -rf restapi/operations
@rm -rf operatorapi/operations
swagger-console:
@echo "Generating swagger server code from yaml"
@swagger generate server -A console --main-package=management --server-package=restapi --exclude-main -P models.Principal -f ./swagger-console.yml -r NOTICE
@swagger generate server -A console --main-package=management --server-package=restapi --exclude-main -P models.Principal -f ./swagger.yml -r NOTICE
@echo "Generating typescript api"
@npx swagger-typescript-api -p ./swagger.yml -o ./portal-ui/src/api -n consoleApi.ts
swagger-operator:
@echo "Generating swagger server code from yaml"
@swagger generate server -A operator --main-package=operator --server-package=operatorapi --exclude-main -P models.Principal -f ./swagger-operator.yml -r NOTICE
assets:
@(cd portal-ui; yarn install; make build-static; yarn prettier --write . --loglevel warn; cd ..)
@(if [ -f "${NVM_DIR}/nvm.sh" ]; then \. "${NVM_DIR}/nvm.sh" && nvm install && nvm use && npm install -g yarn ; fi &&\
cd portal-ui; yarn install --prefer-offline; make build-static; yarn prettier --write . --loglevel warn; cd ..)
test-integration:
@(docker run -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4} && sleep 5)
@(GO111MODULE=on go test -race -v github.com/minio/console/integration/...)
@(docker stop pgsqlcontainer || true)
@(docker stop minio || true)
@(docker stop minio2 || true)
@(docker network rm mynet123 || true)
@echo "create docker network to communicate containers MinIO & PostgreSQL"
@(docker network create --subnet=173.18.0.0/29 mynet123)
@echo "docker run with MinIO Version below:"
@echo $(MINIO_VERSION)
@echo "MinIO 1"
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 --net=mynet123 -d --name minio --rm -p 9000:9000 -p 9091:9091 -e MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw= $(MINIO_VERSION) server /data{1...4} --console-address ':9091' && sleep 5)
@echo "MinIO 2"
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 --net=mynet123 -d --name minio2 --rm -p 9001:9001 -p 9092:9092 -e MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw= $(MINIO_VERSION) server /data{1...4} --address ':9001' --console-address ':9092' && sleep 5)
@echo "Postgres"
@(docker run --net=mynet123 --ip=173.18.0.4 --name pgsqlcontainer --rm -p 5432:5432 -e POSTGRES_PASSWORD=password -d postgres && sleep 5)
@echo "execute test and get coverage for test-integration:"
@(cd integration && go test -coverpkg=../restapi -c -tags testrunmain . && mkdir -p coverage && ./integration.test -test.v -test.run "^Test*" -test.coverprofile=coverage/system.out)
@(docker stop pgsqlcontainer)
@(docker stop minio)
@(docker stop minio2)
@(docker network rm mynet123)
test-replication:
@(docker stop minio || true)
@(docker stop minio1 || true)
@(docker stop minio2 || true)
@(docker network rm mynet123 || true)
@(docker network create mynet123)
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 \
--net=mynet123 -d \
--name minio \
--rm \
-p 9000:9000 \
-p 6000:6000 \
-e MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw= \
-e MINIO_ROOT_USER="minioadmin" \
-e MINIO_ROOT_PASSWORD="minioadmin" \
$(MINIO_VERSION) server /data{1...4} \
--address :9000 \
--console-address :6000)
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 \
--net=mynet123 -d \
--name minio1 \
--rm \
-p 9001:9001 \
-p 6001:6001 \
-e MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw= \
-e MINIO_ROOT_USER="minioadmin" \
-e MINIO_ROOT_PASSWORD="minioadmin" \
$(MINIO_VERSION) server /data{1...4} \
--address :9001 \
--console-address :6001)
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 \
--net=mynet123 -d \
--name minio2 \
--rm \
-p 9002:9002 \
-p 6002:6002 \
-e MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw= \
-e MINIO_ROOT_USER="minioadmin" \
-e MINIO_ROOT_PASSWORD="minioadmin" \
$(MINIO_VERSION) server /data{1...4} \
--address :9002 \
--console-address :6002)
@(cd replication && go test -coverpkg=../restapi -c -tags testrunmain . && mkdir -p coverage && ./replication.test -test.v -test.run "^Test*" -test.coverprofile=coverage/replication.out)
@(docker stop minio || true)
@(docker stop minio1 || true)
@(docker stop minio2 || true)
@(docker network rm mynet123 || true)
test-sso-integration:
@echo "create the network in bridge mode to communicate all containers"
@(docker network create my-net)
@echo "run openldap container using MinIO Image: quay.io/minio/openldap:latest"
@(docker run \
-e LDAP_ORGANIZATION="MinIO Inc" \
-e LDAP_DOMAIN="min.io" \
-e LDAP_ADMIN_PASSWORD="admin" \
--network my-net \
-p 389:389 \
-p 636:636 \
--name openldap \
--detach quay.io/minio/openldap:latest)
@echo "Run Dex container using MinIO Image: quay.io/minio/dex:latest"
@(docker run \
-e DEX_ISSUER=http://dex:5556/dex \
-e DEX_CLIENT_REDIRECT_URI=http://127.0.0.1:9090/oauth_callback \
-e DEX_LDAP_SERVER=openldap:389 \
--network my-net \
-p 5556:5556 \
--name dex \
--detach quay.io/minio/dex:latest)
@echo "running minio server"
@(docker run \
-v /data1 -v /data2 -v /data3 -v /data4 \
--network my-net \
-d \
--name minio \
--rm \
-p 9000:9000 \
-p 9001:9001 \
-e MINIO_IDENTITY_OPENID_CLIENT_ID="minio-client-app" \
-e MINIO_IDENTITY_OPENID_CLIENT_SECRET="minio-client-app-secret" \
-e MINIO_IDENTITY_OPENID_CLAIM_NAME=name \
-e MINIO_IDENTITY_OPENID_CONFIG_URL=http://dex:5556/dex/.well-known/openid-configuration \
-e MINIO_IDENTITY_OPENID_REDIRECT_URI=http://127.0.0.1:9090/oauth_callback \
-e MINIO_ROOT_USER=minio \
-e MINIO_ROOT_PASSWORD=minio123 $(MINIO_VERSION) server /data{1...4} --address :9000 --console-address :9001)
@echo "run mc commands to set the policy"
@(docker run --name minio-client --network my-net -dit --entrypoint=/bin/sh minio/mc)
@(docker exec minio-client mc alias set myminio/ http://minio:9000 minio minio123)
@echo "adding policy to Dillon Harper to be able to login:"
@(cd sso-integration && docker cp allaccess.json minio-client:/ && docker exec minio-client mc admin policy create myminio "Dillon Harper" allaccess.json)
@echo "starting bash script"
@(env bash $(PWD)/sso-integration/set-sso.sh)
@echo "add python module"
@(pip3 install bs4)
@echo "Executing the test:"
@(cd sso-integration && go test -coverpkg=../restapi -c -tags testrunmain . && mkdir -p coverage && ./sso-integration.test -test.v -test.run "^Test*" -test.coverprofile=coverage/sso-system.out)
test-permissions-1:
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4})
@(env bash $(PWD)/portal-ui/tests/scripts/permissions.sh "portal-ui/tests/permissions-1/")
@(docker stop minio)
test-permissions-2:
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4})
@(env bash $(PWD)/portal-ui/tests/scripts/permissions.sh "portal-ui/tests/permissions-2/")
@(docker stop minio)
test-permissions-3:
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4})
@(env bash $(PWD)/portal-ui/tests/scripts/permissions.sh "portal-ui/tests/permissions-3/")
@(docker stop minio)
test-permissions-4:
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4})
@(env bash $(PWD)/portal-ui/tests/scripts/permissions.sh "portal-ui/tests/permissions-4/")
@(docker stop minio)
test-permissions-5:
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4})
@(env bash $(PWD)/portal-ui/tests/scripts/permissions.sh "portal-ui/tests/permissions-5/")
@(docker stop minio)
test-permissions-6:
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4})
@(env bash $(PWD)/portal-ui/tests/scripts/permissions.sh "portal-ui/tests/permissions-6/")
@(docker stop minio)
test-permissions-7:
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4})
@(env bash $(PWD)/portal-ui/tests/scripts/permissions.sh "portal-ui/tests/permissions-7/")
@(docker stop minio)
test-apply-permissions:
@(env bash $(PWD)/portal-ui/tests/scripts/initialize-env.sh)
test-start-docker-minio:
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4})
initialize-permissions: test-start-docker-minio test-apply-permissions
@echo "Done initializing permissions test"
cleanup-permissions:
@(env bash $(PWD)/portal-ui/tests/scripts/cleanup-env.sh)
@(docker stop minio)
test:
@(GO111MODULE=on go test -race -v github.com/minio/console/restapi/...)
@echo "execute test and get coverage"
@(cd restapi && mkdir coverage && GO111MODULE=on go test -test.v -coverprofile=coverage/coverage.out)
test-pkg:
@(GO111MODULE=on go test -race -v github.com/minio/console/pkg/...)
@echo "execute test and get coverage"
@(cd pkg && mkdir coverage && GO111MODULE=on go test -test.v -coverprofile=coverage/coverage-pkg.out)
coverage:
@(GO111MODULE=on go test -v -coverprofile=coverage.out github.com/minio/console/restapi/... && go tool cover -html=coverage.out && open coverage.html)
@@ -84,4 +248,10 @@ clean:
@rm -vf console
docker:
@docker buildx build --output=type=docker --platform linux/amd64 -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' .
@docker buildx build --output=type=docker --platform linux/amd64 -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' --build-arg NODE_VERSION='$(NODE_VERSION)' .
release: swagger-gen
@echo "Generating Release: $(RELEASE)"
@make assets
@git add -u .
@git add portal-ui/build/

2
NOTICE
View File

@@ -1,5 +1,5 @@
This file is part of MinIO Console Server
Copyright (c) 2021 MinIO, Inc.
Copyright (c) 2023 MinIO, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by

111
README.md
View File

@@ -4,9 +4,9 @@
A graphical user interface for [MinIO](https://github.com/minio/minio)
| Dashboard | Creating a bucket |
| ------------- | ------------- |
| ![Dashboard](images/pic1.png) | ![Dashboard](images/pic2.png) |
| Object Browser | Dashboard | Creating a bucket |
|------------------------------------|-------------------------------|-------------------------------|
| ![Object Browser](images/pic3.png) | ![Dashboard](images/pic1.png) | ![Dashboard](images/pic2.png) |
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
**Table of Contents**
@@ -31,16 +31,18 @@ A graphical user interface for [MinIO](https://github.com/minio/minio)
### Binary Releases
| OS | ARCH | Binary |
| OS | ARCH | Binary |
|:-------:|:-------:|:----------------------------------------------------------------------------------------------------:|
| Linux | amd64 | [linux-amd64](https://github.com/minio/console/releases/latest/download/console-linux-amd64) |
| Linux | arm64 | [linux-arm64](https://github.com/minio/console/releases/latest/download/console-linux-arm64) |
| Linux | ppc64le | [linux-ppc64le](https://github.com/minio/console/releases/latest/download/console-linux-ppc64le) |
| Linux | s390x | [linux-s390x](https://github.com/minio/console/releases/latest/download/console-linux-s390x) |
| Apple | amd64 | [darwin-amd64](https://github.com/minio/console/releases/latest/download/console-darwin-amd64) |
| Windows | amd64 | [windows-amd64](https://github.com/minio/console/releases/latest/download/console-windows-amd64.exe) |
| Linux | amd64 | [linux-amd64](https://github.com/minio/console/releases/latest/download/console-linux-amd64) |
| Linux | arm64 | [linux-arm64](https://github.com/minio/console/releases/latest/download/console-linux-arm64) |
| Linux | ppc64le | [linux-ppc64le](https://github.com/minio/console/releases/latest/download/console-linux-ppc64le) |
| Linux | s390x | [linux-s390x](https://github.com/minio/console/releases/latest/download/console-linux-s390x) |
| Apple | amd64 | [darwin-amd64](https://github.com/minio/console/releases/latest/download/console-darwin-amd64) |
| Windows | amd64 | [windows-amd64](https://github.com/minio/console/releases/latest/download/console-windows-amd64.exe) |
You can also verify the binary with [minisign](https://jedisct1.github.io/minisign/) by downloading the
corresponding [`.minisig`](https://github.com/minio/console/releases/latest) signature file. Then run:
You can also verify the binary with [minisign](https://jedisct1.github.io/minisign/) by downloading the corresponding [`.minisig`](https://github.com/minio/console/releases/latest) signature file. Then run:
```
minisign -Vm console-<OS>-<ARCH> -P RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav
```
@@ -48,13 +50,15 @@ minisign -Vm console-<OS>-<ARCH> -P RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRyw
### Docker
Pull the latest release via:
```
docker pull minio/console
```
### Build from source
> You will need a working Go environment. Therefore, please follow [How to install Go](https://golang.org/doc/install).
> Minimum version required is go1.17
> Minimum version required is go1.19
```
go install github.com/minio/console/cmd/console@latest
@@ -103,60 +107,64 @@ EOF
```
```sh
mc admin policy add myminio/ consoleAdmin admin.json
mc admin policy create myminio/ consoleAdmin admin.json
```
### 3. Set the policy for the new `console` user
```sh
mc admin policy set myminio consoleAdmin user=console
mc admin policy attach myminio consoleAdmin --user=console
```
> NOTE: Additionally, you can create policies to limit the privileges for other `console` users, for example, if you want the user to only have access to dashboard, buckets, notifications and watch page, the policy should look like this:
> NOTE: Additionally, you can create policies to limit the privileges for other `console` users, for example, if you
> want the user to only have access to dashboard, buckets, notifications and watch page, the policy should look like
> this:
```json
{
"Version": "2012-10-17",
"Statement": [{
"Action": [
"admin:ServerInfo"
],
"Effect": "Allow",
"Sid": ""
},
{
"Action": [
"s3:ListenBucketNotification",
"s3:PutBucketNotification",
"s3:GetBucketNotification",
"s3:ListMultipartUploadParts",
"s3:ListBucketMultipartUploads",
"s3:ListBucket",
"s3:HeadBucket",
"s3:GetObject",
"s3:GetBucketLocation",
"s3:AbortMultipartUpload",
"s3:CreateBucket",
"s3:PutObject",
"s3:DeleteObject",
"s3:DeleteBucket",
"s3:PutBucketPolicy",
"s3:DeleteBucketPolicy",
"s3:GetBucketPolicy"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::*"
],
"Sid": ""
}
]
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"admin:ServerInfo"
],
"Effect": "Allow",
"Sid": ""
},
{
"Action": [
"s3:ListenBucketNotification",
"s3:PutBucketNotification",
"s3:GetBucketNotification",
"s3:ListMultipartUploadParts",
"s3:ListBucketMultipartUploads",
"s3:ListBucket",
"s3:HeadBucket",
"s3:GetObject",
"s3:GetBucketLocation",
"s3:AbortMultipartUpload",
"s3:CreateBucket",
"s3:PutObject",
"s3:DeleteObject",
"s3:DeleteBucket",
"s3:PutBucketPolicy",
"s3:DeleteBucketPolicy",
"s3:GetBucketPolicy"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::*"
],
"Sid": ""
}
]
}
```
## Start Console service:
Before running console service, following environment settings must be supplied
```sh
# Salt to encrypt JWT payload
export CONSOLE_PBKDF_PASSPHRASE=SECRET
@@ -169,6 +177,7 @@ export CONSOLE_MINIO_SERVER=http://localhost:9000
```
Now start the console service.
```
./console server
2021-01-19 02:36:08.893735 I | 2021/01/19 02:36:08 server.go:129: Serving console at http://localhost:9090
@@ -189,6 +198,7 @@ Copy your `public.crt` and `private.key` to `~/.console/certs`, then:
For advanced users, `console` has support for multiple certificates to service clients through multiple domains.
Following tree structure is expected for supporting multiple domains:
```sh
certs/
@@ -219,4 +229,5 @@ export CONSOLE_MINIO_SERVER=https://localhost:9000
You can verify that the apis work by doing the request on `localhost:9090/api/v1/...`
# Contribute to console Project
Please follow console [Contributor's Guide](https://github.com/minio/console/blob/master/CONTRIBUTING.md)

View File

@@ -18,9 +18,10 @@ you need access credentials for a successful exploit).
If you have not received a reply to your email within 48 hours or you have not heard from the security team
for the past five days please contact the security team directly:
- Primary security coordinator: lenin@min.io
- Secondary coordinator: security@min.io
- If you receive no response: dev@min.io
- Primary security coordinator: daniel@min.io
- Secondary coordinator: security@min.io
- If you receive no response: dev@min.io
### Disclosure Process

View File

@@ -1,71 +0,0 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package cluster
import (
direct "github.com/minio/direct-csi/pkg/clientset"
operator "github.com/minio/operator/pkg/client/clientset/versioned"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
certutil "k8s.io/client-go/util/cert"
)
// getTLSClientConfig will return the right TLS configuration for the K8S client based on the configured TLS certificate
func getTLSClientConfig() rest.TLSClientConfig {
var defaultRootCAFile = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
var customRootCAFile = getK8sAPIServerTLSRootCA()
tlsClientConfig := rest.TLSClientConfig{}
// if console is running inside k8s by default he will have access to the CA Cert from the k8s local authority
if _, err := certutil.NewPool(defaultRootCAFile); err == nil {
tlsClientConfig.CAFile = defaultRootCAFile
}
// if the user explicitly define a custom CA certificate, instead, we will use that
if customRootCAFile != "" {
if _, err := certutil.NewPool(customRootCAFile); err == nil {
tlsClientConfig.CAFile = customRootCAFile
}
}
return tlsClientConfig
}
// This operation will run only once at console startup
var tlsClientConfig = getTLSClientConfig()
func GetK8sConfig(token string) *rest.Config {
config := &rest.Config{
Host: GetK8sAPIServer(),
TLSClientConfig: tlsClientConfig,
APIPath: "/",
BearerToken: token,
}
return config
}
// OperatorClient returns an operator client using GetK8sConfig for its config
func OperatorClient(token string) (*operator.Clientset, error) {
return operator.NewForConfig(GetK8sConfig(token))
}
// K8sClient returns kubernetes client using GetK8sConfig for its config
func K8sClient(token string) (*kubernetes.Clientset, error) {
return kubernetes.NewForConfig(GetK8sConfig(token))
}
// DirectCSIClient returns Direct CSI client using GetK8sConfig for its config
func DirectCSIClient(token string) (*direct.Clientset, error) {
return direct.NewForConfig(GetK8sConfig(token))
}

View File

@@ -1,121 +0,0 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package cluster
import (
"errors"
"fmt"
"io/ioutil"
"net"
"net/http"
"regexp"
"strings"
"time"
"github.com/minio/pkg/env"
)
var (
errCantDetermineMinIOImage = errors.New("can't determine MinIO Image")
)
func GetK8sAPIServer() string {
// if console is running inside a k8s pod KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT will contain the k8s api server apiServerAddress
// if console is not running inside k8s by default will look for the k8s api server on localhost:8001 (kubectl proxy)
// NOTE: using kubectl proxy is for local development only, since every request send to localhost:8001 will bypass service account authentication
// more info here: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#directly-accessing-the-rest-api
// you can override this using CONSOLE_K8S_API_SERVER, ie use the k8s cluster from `kubectl config view`
host, port := env.Get("KUBERNETES_SERVICE_HOST", ""), env.Get("KUBERNETES_SERVICE_PORT", "")
apiServerAddress := "http://localhost:8001"
if host != "" && port != "" {
apiServerAddress = "https://" + net.JoinHostPort(host, port)
}
return env.Get(ConsoleK8sAPIServer, apiServerAddress)
}
// If CONSOLE_K8S_API_SERVER_TLS_ROOT_CA is true console will load the certificate into the
// http.client rootCAs pool, this is useful for testing an k8s ApiServer or when working with self-signed certificates
func getK8sAPIServerTLSRootCA() string {
return strings.TrimSpace(env.Get(ConsoleK8SAPIServerTLSRootCA, ""))
}
// GetNsFromFile assumes console is running inside a k8s pod and extract the current namespace from the
// /var/run/secrets/kubernetes.io/serviceaccount/namespace file
func GetNsFromFile() string {
dat, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
if err != nil {
return "default"
}
return string(dat)
}
// Namespace will run only once at console startup
var Namespace = GetNsFromFile()
// getLatestMinIOImage returns the latest docker image for MinIO if found on the internet
func getLatestMinIOImage(client HTTPClientI) (*string, error) {
resp, err := client.Get("https://dl.min.io/server/minio/release/linux-amd64/")
if err != nil {
return nil, err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}
var re = regexp.MustCompile(`(?m)\.\/minio\.(RELEASE.*?Z)"`)
// look for a single match
matches := re.FindAllStringSubmatch(string(body), 1)
for i := range matches {
release := matches[i][1]
dockerImage := fmt.Sprintf("minio/minio:%s", release)
return &dockerImage, nil
}
return nil, errCantDetermineMinIOImage
}
var latestMinIOImage, errLatestMinIOImage = getLatestMinIOImage(
&HTTPClient{
Client: &http.Client{
Timeout: 15 * time.Second,
},
})
// GetMinioImage returns the image URL to be used when deploying a MinIO instance, if there is
// a preferred image to be used (configured via ENVIRONMENT VARIABLES) GetMinioImage will return that
// if not, GetMinioImage will try to obtain the image URL for the latest version of MinIO and return that
func GetMinioImage() (*string, error) {
image := strings.TrimSpace(env.Get(ConsoleMinioImage, ""))
// if there is a preferred image configured by the user we'll always return that
if image != "" {
return &image, nil
}
if errLatestMinIOImage != nil {
return nil, errLatestMinIOImage
}
return latestMinIOImage, nil
}
// GetLatestMinioImage returns the latest image URL on minio repository
func GetLatestMinioImage(client HTTPClientI) (*string, error) {
latestMinIOImage, err := getLatestMinIOImage(client)
if err != nil {
return nil, err
}
return latestMinIOImage, nil
}

View File

@@ -1,24 +0,0 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package cluster
const (
ConsoleK8sAPIServer = "CONSOLE_K8S_API_SERVER"
ConsoleK8SAPIServerTLSRootCA = "CONSOLE_K8S_API_SERVER_TLS_ROOT_CA"
ConsoleMinioImage = "CONSOLE_MINIO_IMAGE"
ConsoleMCImage = "CONSOLE_MC_IMAGE"
)

View File

@@ -1,53 +0,0 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package cluster
import (
"io"
"net/http"
)
// HTTPClientI interface with all functions to be implemented
// by mock when testing, it should include all HttpClient respective api calls
// that are used within this project.
type HTTPClientI interface {
Get(url string) (resp *http.Response, err error)
Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
Do(req *http.Request) (*http.Response, error)
}
// HTTPClient Interface implementation
//
// Define the structure of a http client and define the functions that are actually used
type HTTPClient struct {
Client *http.Client
}
// Get implements http.Client.Get()
func (c *HTTPClient) Get(url string) (resp *http.Response, err error) {
return c.Client.Get(url)
}
// Post implements http.Client.Post()
func (c *HTTPClient) Post(url, contentType string, body io.Reader) (resp *http.Response, err error) {
return c.Client.Post(url, contentType, body)
}
// Do implements http.Client.Do()
func (c *HTTPClient) Do(req *http.Request) (*http.Response, error) {
return c.Client.Do(req)
}

View File

@@ -0,0 +1,90 @@
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package main
import (
"context"
"fmt"
"strconv"
"time"
"github.com/minio/console/pkg/logger"
"github.com/minio/cli"
"github.com/minio/console/restapi"
)
var appCmds = []cli.Command{
serverCmd,
updateCmd,
}
// StartServer starts the console service
func StartServer(ctx *cli.Context) error {
if err := loadAllCerts(ctx); err != nil {
// Log this as a warning and continue running console without TLS certificates
restapi.LogError("Unable to load certs: %v", err)
}
xctx := context.Background()
transport := restapi.PrepareSTSClientTransport(false, restapi.LocalAddress)
if err := logger.InitializeLogger(xctx, transport.Transport); err != nil {
fmt.Println("error InitializeLogger", err)
logger.CriticalIf(xctx, err)
}
// custom error configuration
restapi.LogInfo = logger.Info
restapi.LogError = logger.Error
restapi.LogIf = logger.LogIf
var rctx restapi.Context
if err := rctx.Load(ctx); err != nil {
restapi.LogError("argument validation failed: %v", err)
return err
}
server, err := buildServer()
if err != nil {
restapi.LogError("Unable to initialize console server: %v", err)
return err
}
server.Host = rctx.Host
server.Port = rctx.HTTPPort
// set conservative timesout for uploads
server.ReadTimeout = 1 * time.Hour
// no timeouts for response for downloads
server.WriteTimeout = 0
restapi.Port = strconv.Itoa(server.Port)
restapi.Hostname = server.Host
if len(restapi.GlobalPublicCerts) > 0 {
// If TLS certificates are provided enforce the HTTPS schema, meaning console will redirect
// plain HTTP connections to HTTPS server
server.EnabledListeners = []string{"http", "https"}
server.TLSPort = rctx.HTTPSPort
// Need to store tls-port, tls-host un config variables so secure.middleware can read from there
restapi.TLSPort = strconv.Itoa(server.TLSPort)
restapi.Hostname = rctx.Host
restapi.TLSRedirect = rctx.TLSRedirect
}
defer server.Shutdown()
return server.Serve()
}

View File

@@ -32,30 +32,24 @@ import (
// Help template for Console.
var consoleHelpTemplate = `NAME:
{{.Name}} - {{.Usage}}
{{.Name}} - {{.Usage}}
DESCRIPTION:
{{.Description}}
{{.Description}}
USAGE:
{{.HelpName}} {{if .VisibleFlags}}[FLAGS] {{end}}COMMAND{{if .VisibleFlags}}{{end}} [ARGS...]
{{.HelpName}} {{if .VisibleFlags}}[FLAGS] {{end}}COMMAND{{if .VisibleFlags}}{{end}} [ARGS...]
COMMANDS:
{{range .VisibleCommands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
{{end}}{{if .VisibleFlags}}
{{range .VisibleCommands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
{{end}}{{if .VisibleFlags}}
FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}{{end}}
{{range .VisibleFlags}}{{.}}
{{end}}{{end}}
VERSION:
{{.Version}}
{{.Version}}
`
var appCmds = []cli.Command{
serverCmd,
updateCmd,
operatorCmd,
}
func newApp(name string) *cli.App {
// Collection of console commands currently supported are.
var commands []cli.Command

View File

@@ -1,251 +0,0 @@
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package main
import (
"fmt"
"io/ioutil"
"path/filepath"
"strconv"
"syscall"
"time"
"github.com/minio/console/restapi"
"github.com/go-openapi/loads"
"github.com/jessevdk/go-flags"
"github.com/minio/cli"
"github.com/minio/console/operatorapi"
"github.com/minio/console/operatorapi/operations"
"github.com/minio/console/pkg/certs"
)
// starts the server
var operatorCmd = cli.Command{
Name: "operator",
Aliases: []string{"opr"},
Usage: "Start MinIO Operator UI server",
Action: startOperatorServer,
Flags: []cli.Flag{
cli.StringFlag{
Name: "host",
Value: restapi.GetHostname(),
Usage: "bind to a specific HOST, HOST can be an IP or hostname",
},
cli.IntFlag{
Name: "port",
Value: restapi.GetPort(),
Usage: "bind to specific HTTP port",
},
// This is kept here for backward compatibility,
// hostname's do not have HTTP or HTTPs
// hostnames are opaque so using --host
// works for both HTTP and HTTPS setup.
cli.StringFlag{
Name: "tls-host",
Value: restapi.GetHostname(),
Hidden: true,
},
cli.StringFlag{
Name: "certs-dir",
Value: certs.GlobalCertsCADir.Get(),
Usage: "path to certs directory",
},
cli.IntFlag{
Name: "tls-port",
Value: restapi.GetTLSPort(),
Usage: "bind to specific HTTPS port",
},
cli.StringFlag{
Name: "tls-redirect",
Value: restapi.GetTLSRedirect(),
Usage: "toggle HTTP->HTTPS redirect",
},
cli.StringFlag{
Name: "tls-certificate",
Value: "",
Usage: "path to TLS public certificate",
Hidden: true,
},
cli.StringFlag{
Name: "tls-key",
Value: "",
Usage: "path to TLS private key",
Hidden: true,
},
cli.StringFlag{
Name: "tls-ca",
Value: "",
Usage: "path to TLS Certificate Authority",
Hidden: true,
},
},
}
func buildOperatorServer() (*operatorapi.Server, error) {
swaggerSpec, err := loads.Embedded(operatorapi.SwaggerJSON, operatorapi.FlatSwaggerJSON)
if err != nil {
return nil, err
}
api := operations.NewOperatorAPI(swaggerSpec)
api.Logger = operatorapi.LogInfo
server := operatorapi.NewServer(api)
parser := flags.NewParser(server, flags.Default)
parser.ShortDescription = "MinIO Console Server"
parser.LongDescription = swaggerSpec.Spec().Info.Description
server.ConfigureFlags()
// register all APIs
server.ConfigureAPI()
for _, optsGroup := range api.CommandLineOptionsGroups {
_, err := parser.AddGroup(optsGroup.ShortDescription, optsGroup.LongDescription, optsGroup.Options)
if err != nil {
return nil, err
}
}
if _, err := parser.Parse(); err != nil {
return nil, err
}
return server, nil
}
func loadOperatorAllCerts(ctx *cli.Context) error {
var err error
// Set all certs and CAs directories path
certs.GlobalCertsDir, _, err = certs.NewConfigDirFromCtx(ctx, "certs-dir", certs.DefaultCertsDir.Get)
if err != nil {
return err
}
certs.GlobalCertsCADir = &certs.ConfigDir{Path: filepath.Join(certs.GlobalCertsDir.Get(), certs.CertsCADir)}
// check if certs and CAs directories exists or can be created
if err = certs.MkdirAllIgnorePerm(certs.GlobalCertsCADir.Get()); err != nil {
return fmt.Errorf("unable to create certs CA directory at %s: failed with %w", certs.GlobalCertsCADir.Get(), err)
}
// load the certificates and the CAs
operatorapi.GlobalRootCAs, operatorapi.GlobalPublicCerts, operatorapi.GlobalTLSCertsManager, err = certs.GetAllCertificatesAndCAs()
if err != nil {
return fmt.Errorf("unable to load certificates at %s: failed with %w", certs.GlobalCertsDir.Get(), err)
}
{
// TLS flags from swagger server, used to support VMware vsphere operator version.
swaggerServerCertificate := ctx.String("tls-certificate")
swaggerServerCertificateKey := ctx.String("tls-key")
swaggerServerCACertificate := ctx.String("tls-ca")
// load tls cert and key from swagger server tls-certificate and tls-key flags
if swaggerServerCertificate != "" && swaggerServerCertificateKey != "" {
if err = operatorapi.GlobalTLSCertsManager.AddCertificate(swaggerServerCertificate, swaggerServerCertificateKey); err != nil {
return err
}
x509Certs, err := certs.ParsePublicCertFile(swaggerServerCertificate)
if err == nil {
operatorapi.GlobalPublicCerts = append(operatorapi.GlobalPublicCerts, x509Certs...)
}
}
// load ca cert from swagger server tls-ca flag
if swaggerServerCACertificate != "" {
caCert, caCertErr := ioutil.ReadFile(swaggerServerCACertificate)
if caCertErr == nil {
operatorapi.GlobalRootCAs.AppendCertsFromPEM(caCert)
}
}
}
if restapi.GlobalTLSCertsManager != nil {
restapi.GlobalTLSCertsManager.ReloadOnSignal(syscall.SIGHUP)
}
return nil
}
// StartServer starts the console service
func startOperatorServer(ctx *cli.Context) error {
if err := loadOperatorAllCerts(ctx); err != nil {
// Log this as a warning and continue running console without TLS certificates
operatorapi.LogError("Unable to load certs: %v", err)
}
var rctx operatorapi.Context
if err := rctx.Load(ctx); err != nil {
operatorapi.LogError("argument validation failed: %v", err)
return err
}
server, err := buildOperatorServer()
if err != nil {
operatorapi.LogError("Unable to initialize console server: %v", err)
return err
}
server.Host = rctx.Host
server.Port = rctx.HTTPPort
// set conservative timesout for uploads
server.ReadTimeout = 1 * time.Hour
// no timeouts for response for downloads
server.WriteTimeout = 0
operatorapi.Port = strconv.Itoa(server.Port)
operatorapi.Hostname = server.Host
if len(operatorapi.GlobalPublicCerts) > 0 {
// If TLS certificates are provided enforce the HTTPS schema, meaning console will redirect
// plain HTTP connections to HTTPS server
server.EnabledListeners = []string{"http", "https"}
server.TLSPort = rctx.HTTPSPort
// Need to store tls-port, tls-host un config variables so secure.middleware can read from there
operatorapi.TLSPort = strconv.Itoa(server.TLSPort)
operatorapi.Hostname = rctx.Host
operatorapi.TLSRedirect = rctx.TLSRedirect
}
defer server.Shutdown()
// subnet license refresh process
go func() {
// start refreshing subnet license after 5 seconds..
time.Sleep(time.Second * 5)
failedAttempts := 0
for {
if err := operatorapi.RefreshLicense(); err != nil {
operatorapi.LogError("Refreshing subnet license failed: %v", err)
failedAttempts++
// end license refresh after 3 consecutive failed attempts
if failedAttempts >= 3 {
return
}
// wait 5 minutes and retry again
time.Sleep(time.Minute * 5)
continue
}
// if license refreshed successfully reset the counter
failedAttempts = 0
// try to refresh license every 24 hrs
time.Sleep(time.Hour * 24)
}
}()
return server.Serve()
}

View File

@@ -18,12 +18,9 @@ package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"syscall"
"time"
"github.com/go-openapi/loads"
"github.com/jessevdk/go-flags"
@@ -166,7 +163,7 @@ func loadAllCerts(ctx *cli.Context) error {
// load ca cert from swagger server tls-ca flag
if swaggerServerCACertificate != "" {
caCert, caCertErr := ioutil.ReadFile(swaggerServerCACertificate)
caCert, caCertErr := os.ReadFile(swaggerServerCACertificate)
if caCertErr == nil {
restapi.GlobalRootCAs.AppendCertsFromPEM(caCert)
}
@@ -179,51 +176,3 @@ func loadAllCerts(ctx *cli.Context) error {
return nil
}
// StartServer starts the console service
func StartServer(ctx *cli.Context) error {
if os.Getenv("CONSOLE_OPERATOR_MODE") != "" && os.Getenv("CONSOLE_OPERATOR_MODE") == "on" {
return startOperatorServer(ctx)
}
if err := loadAllCerts(ctx); err != nil {
// Log this as a warning and continue running console without TLS certificates
restapi.LogError("Unable to load certs: %v", err)
}
var rctx restapi.Context
if err := rctx.Load(ctx); err != nil {
restapi.LogError("argument validation failed: %v", err)
return err
}
server, err := buildServer()
if err != nil {
restapi.LogError("Unable to initialize console server: %v", err)
return err
}
server.Host = rctx.Host
server.Port = rctx.HTTPPort
// set conservative timesout for uploads
server.ReadTimeout = 1 * time.Hour
// no timeouts for response for downloads
server.WriteTimeout = 0
restapi.Port = strconv.Itoa(server.Port)
restapi.Hostname = server.Host
if len(restapi.GlobalPublicCerts) > 0 {
// If TLS certificates are provided enforce the HTTPS schema, meaning console will redirect
// plain HTTP connections to HTTPS server
server.EnabledListeners = []string{"http", "https"}
server.TLSPort = rctx.HTTPSPort
// Need to store tls-port, tls-host un config variables so secure.middleware can read from there
restapi.TLSPort = strconv.Itoa(server.TLSPort)
restapi.Hostname = rctx.Host
restapi.TLSRedirect = rctx.TLSRedirect
}
defer server.Shutdown()
return server.Serve()
}

View File

@@ -96,7 +96,7 @@ var updateCmd = cli.Command{
Action: updateInplace,
}
func updateInplace(ctx *cli.Context) error {
func updateInplace(_ *cli.Context) error {
transport := getUpdateTransport(30 * time.Second)
rel, err := getLatestRelease(transport)
if err != nil {

View File

@@ -1,39 +0,0 @@
# Running Console in Operator mode
`Console` will authenticate against `Kubernetes`using bearer tokens via HTTP `Authorization` header. The user will provide this token once
in the login form, Console will validate it against Kubernetes (list apis) and if valid will generate and return a new Console sessions
with encrypted claims (the user Service account token will be inside the session encrypted token
# Kubernetes
The provided `JWT token` corresponds to the `Kubernetes service account` that `Console` will use to run tasks on behalf of the
user, ie: list, create, edit, delete tenants, storage class, etc.
# Development
If console is running inside a k8s pod `KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT` will contain the k8s api server apiServerAddress
if console is not running inside k8s by default will look for the k8s api server on `localhost:8001` (kubectl proxy)
If you are running console in your local environment and wish to make request to `Kubernetes` you can set `CONSOLE_K8S_API_SERVER`, if
the environment variable is not present by default `Console` will use `"http://localhost:8001"`, additionally you will need to set the
`CONSOLE_OPERATOR_MODE=on` variable to make Console display the Operator UI.
NOTE: using `kubectl` proxy is for local development only, since every request send to localhost:8001 will bypass service account authentication
more info here: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#directly-accessing-the-rest-api
you can override this using `CONSOLE_K8S_API_SERVER`, ie use the k8s cluster from `kubectl config view`
## Extract the Service account token and use it with Console
For local development you can use the jwt associated to the `console-sa` service account, you can get the token running
the following command in your terminal:
```
kubectl get secret $(kubectl get serviceaccount console-sa -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}" | base64 --decode
```
Then run the Console server
```
CONSOLE_OPERATOR_MODE=on ./console server
```

245
go.mod
View File

@@ -1,156 +1,153 @@
module github.com/minio/console
go 1.17
go 1.20
require (
github.com/blang/semver/v4 v4.0.0
github.com/cheggaaa/pb/v3 v3.0.6
github.com/dustin/go-humanize v1.0.0
github.com/go-openapi/errors v0.19.9
github.com/go-openapi/loads v0.20.2
github.com/go-openapi/runtime v0.19.24
github.com/go-openapi/spec v0.20.3
github.com/go-openapi/strfmt v0.20.0
github.com/go-openapi/swag v0.19.14
github.com/go-openapi/validate v0.20.2
github.com/golang-jwt/jwt/v4 v4.1.0
github.com/gorilla/websocket v1.4.2
github.com/jessevdk/go-flags v1.4.0
github.com/klauspost/compress v1.13.6
github.com/minio/cli v1.22.0
github.com/minio/direct-csi v1.3.5-0.20210601185811-f7776f7961bf
github.com/minio/kes v0.11.0
github.com/minio/madmin-go v1.1.21
github.com/minio/mc v0.0.0-20211207230606-23a05f5a17f2
github.com/minio/minio-go/v7 v7.0.20
github.com/minio/operator v0.0.0-20211011212245-31460bbbc4b7
github.com/minio/operator/logsearchapi v0.0.0-20211011212245-31460bbbc4b7
github.com/minio/pkg v1.1.10
github.com/minio/selfupdate v0.3.1
github.com/cheggaaa/pb/v3 v3.1.2
github.com/dustin/go-humanize v1.0.1
github.com/fatih/color v1.15.0
github.com/go-openapi/errors v0.20.3
github.com/go-openapi/loads v0.21.2
github.com/go-openapi/runtime v0.26.0
github.com/go-openapi/spec v0.20.9
github.com/go-openapi/strfmt v0.21.7
github.com/go-openapi/swag v0.22.3
github.com/go-openapi/validate v0.22.1
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/google/uuid v1.3.0
github.com/jessevdk/go-flags v1.5.0
github.com/klauspost/compress v1.16.5
github.com/minio/cli v1.24.2
github.com/minio/highwayhash v1.0.2
github.com/minio/kes v0.22.3
github.com/minio/madmin-go/v3 v3.0.2
github.com/minio/mc v0.0.0-20230619193119-5f39522e6902
github.com/minio/minio-go/v7 v7.0.58-0.20230622175401-7048a16cfbca
github.com/minio/pkg v1.7.5
github.com/minio/selfupdate v0.6.0
github.com/minio/websocket v1.6.0
github.com/mitchellh/go-homedir v1.1.0
github.com/rs/xid v1.3.0
github.com/rs/xid v1.5.0
github.com/secure-io/sio-go v0.3.1
github.com/stretchr/testify v1.7.0
github.com/unrolled/secure v1.0.9
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/client-go v0.21.1
github.com/stretchr/testify v1.8.4
github.com/tidwall/gjson v1.14.4
github.com/unrolled/secure v1.13.0
golang.org/x/crypto v0.9.0
golang.org/x/net v0.10.0
golang.org/x/oauth2 v0.7.0
// Added to include security fix for
// https://github.com/golang/go/issues/56152
golang.org/x/text v0.9.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/VividCortex/ewma v1.1.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect
aead.dev/mem v0.2.0 // indirect
aead.dev/minisign v0.2.0 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/briandowns/spinner v1.16.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/charmbracelet/bubbles v0.15.0 // indirect
github.com/charmbracelet/bubbletea v0.23.2 // indirect
github.com/charmbracelet/lipgloss v0.7.1 // indirect
github.com/cheggaaa/pb v1.0.29 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/georgysavva/scany v0.2.7 // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/gdamore/encoding v1.0.0 // indirect
github.com/gdamore/tcell/v2 v2.6.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/analysis v0.20.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/goccy/go-json v0.7.9 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gnostic v0.5.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jedib0t/go-pretty/v6 v6.4.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/juju/ratelimit v1.0.2 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
github.com/lestrrat-go/blackmagic v1.0.0 // indirect
github.com/lestrrat-go/httpcc v1.0.0 // indirect
github.com/lestrrat-go/iter v1.0.1 // indirect
github.com/lestrrat-go/jwx v1.2.7 // indirect
github.com/lestrrat-go/option v1.0.0 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-colorable v0.1.10 // indirect
github.com/lestrrat-go/blackmagic v1.0.1 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx v1.2.26 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mb0/glob v0.0.0-20160210091149-1eb79d2de6c4 // indirect
github.com/minio/argon2 v1.0.0 // indirect
github.com/minio/colorjson v1.0.1 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/colorjson v1.0.5 // indirect
github.com/minio/filepath v1.0.0 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/montanaflynn/stats v0.7.0 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.1 // indirect
github.com/navidys/tvxwidgets v0.3.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.6.0 // indirect
github.com/pkg/xattr v0.4.3 // indirect
github.com/pkg/xattr v0.4.9 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.31.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rjeczalik/notify v0.9.2 // indirect
github.com/shirou/gopsutil/v3 v3.21.8 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/tidwall/gjson v1.10.2 // indirect
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/prom2json v1.3.2 // indirect
github.com/rivo/tview v0.0.0-20230406072732-e22ce9588bb4 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rjeczalik/notify v0.9.3 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/shirou/gopsutil/v3 v3.23.3 // indirect
github.com/shoenig/go-m1cpu v0.1.5 // indirect
github.com/sirupsen/logrus v1.9.2 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tinylib/msgp v1.1.6 // indirect
github.com/tklauser/go-sysconf v0.3.9 // indirect
github.com/tklauser/numcpus v0.3.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.0 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.0 // indirect
go.etcd.io/etcd/client/v3 v3.5.0 // indirect
go.mongodb.org/mongo-driver v1.4.6 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.19.1 // indirect
golang.org/x/sys v0.0.0-20211015200801-69063c4bb744 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20210928142010-c7af6a1a74c9 // indirect
google.golang.org/grpc v1.41.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tinylib/msgp v1.1.8 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect
go.etcd.io/etcd/client/v3 v3.5.7 // indirect
go.mongodb.org/mongo-driver v1.11.3 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd // indirect
google.golang.org/grpc v1.54.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/h2non/filetype.v1 v1.0.5 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/klog/v2 v2.8.0 // indirect
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
maze.io/x/duration v0.0.0-20160924141736-faac084b6075 // indirect
sigs.k8s.io/controller-runtime v0.8.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
replace google.golang.org/grpc => google.golang.org/grpc v1.29.1

2056
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +1,4 @@
#!/bin/bash
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o errexit
set -o nounset
@@ -20,10 +6,7 @@ set -o pipefail
SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..
go get -d k8s.io/code-generator/...
# Checkout code-generator to compatible version
#(cd $GOPATH/src/k8s.io/code-generator && git checkout origin/release-1.14 -B release-1.14)
GO111MODULE=off go get -d k8s.io/code-generator/...
REPOSITORY=github.com/minio/console
$GOPATH/src/k8s.io/code-generator/generate-groups.sh all \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

BIN
images/pic3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

@@ -0,0 +1,216 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func Test_AddAccessRuleAPI(t *testing.T) {
assert := assert.New(t)
AddBucket("testaccessruleadd", false, false, nil, nil)
type args struct {
bucket string
prefix string
access string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Create Access Rule - Valid",
args: args{
bucket: "testaccessruleadd",
prefix: "/test/",
access: "readonly",
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "Add Access Rule - Invalid",
args: args{
bucket: "testaccessruleadd",
prefix: "/test/",
access: "readonl",
},
expectedStatus: 500,
expectedError: nil,
},
{
name: "Add Access Rule - Invalid Bucket",
args: args{
bucket: "fakebucket",
prefix: "/test/",
access: "readonl",
},
expectedStatus: 404,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataPolicy["prefix"] = tt.args.prefix
requestDataPolicy["access"] = tt.args.access
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT", fmt.Sprintf("http://localhost:9090/api/v1/bucket/%s/access-rules", tt.args.bucket), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}
func Test_GetAccessRulesAPI(t *testing.T) {
assert := assert.New(t)
AddBucket("testaccessruleget", false, false, nil, nil)
type args struct {
bucket string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Get Access Rule - Valid",
args: args{
bucket: "testaccessruleget",
},
expectedStatus: 200,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1/bucket/%s/access-rules", tt.args.bucket), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}
func Test_DeleteAccessRuleAPI(t *testing.T) {
assert := assert.New(t)
AddBucket("testaccessruledelete", false, false, nil, nil)
type args struct {
prefix string
access string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Delete Access Rule - Valid",
args: args{
prefix: "/test/",
},
expectedStatus: 200,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataPolicy["prefix"] = tt.args.prefix
requestDataPolicy["access"] = tt.args.access
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"DELETE", "http://localhost:9090/api/v1/bucket/testaccessruledelete/access-rules", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}

View File

@@ -0,0 +1,407 @@
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// These tests are for AdminAPI Tag based on swagger-console.yml
package integration
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
"path"
"testing"
"time"
"github.com/minio/console/models"
"github.com/stretchr/testify/assert"
)
func RestartService() (*http.Response, error) {
/*
Helper function to restart service
HTTP Verb: POST
URL: /api/v1/service/restart
*/
request, err := http.NewRequest(
"POST",
"http://localhost:9090/api/v1/service/restart",
nil,
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
client := &http.Client{
Timeout: 2000 * time.Second, // increased timeout since restart takes time, more than other APIs.
}
response, err := client.Do(request)
return response, err
}
func GetNodes() (*http.Response, error) {
/*
Helper function to get nodes
HTTP Verb: GET
URL: /api/v1/nodes
*/
request, err := http.NewRequest(
"GET",
"http://localhost:9090/api/v1/nodes",
nil,
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
client := &http.Client{
Timeout: 2000 * time.Second, // increased timeout since restart takes time, more than other APIs.
}
response, err := client.Do(request)
return response, err
}
func NotifyPostgres() (*http.Response, error) {
/*
Helper function to add Postgres Notification
HTTP Verb: PUT
URL: api/v1/configs/notify_postgres
Body:
{
"key_values":[
{
"key":"connection_string",
"value":"user=postgres password=password host=localhost dbname=postgres port=5432 sslmode=disable"
},
{
"key":"table",
"value":"accountsssss"
},
{
"key":"format",
"value":"namespace"
},
{
"key":"queue_limit",
"value":"10000"
},
{
"key":"comment",
"value":"comment"
}
]
}
*/
Body := models.SetConfigRequest{
KeyValues: []*models.ConfigurationKV{
{
Key: "connection_string",
Value: "user=postgres password=password host=173.18.0.4 dbname=postgres port=5432 sslmode=disable",
},
{
Key: "table",
Value: "accountsssss",
},
{
Key: "format",
Value: "namespace",
},
{
Key: "queue_limit",
Value: "10000",
},
{
Key: "comment",
Value: "comment",
},
},
}
requestDataJSON, _ := json.Marshal(Body)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT",
"http://localhost:9090/api/v1/configs/notify_postgres",
requestDataBody,
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
client := &http.Client{
Timeout: 2 * time.Second,
}
response, err := client.Do(request)
return response, err
}
func TestNotifyPostgres(t *testing.T) {
// Variables
asserter := assert.New(t)
// Test
response, err := NotifyPostgres()
finalResponse := inspectHTTPResponse(response)
asserter.Nil(err)
if err != nil {
log.Println(err)
asserter.Fail(finalResponse)
return
}
if response != nil {
asserter.Equal(200, response.StatusCode, finalResponse)
}
}
func TestRestartService(t *testing.T) {
asserter := assert.New(t)
restartResponse, restartError := RestartService()
asserter.Nil(restartError)
if restartError != nil {
log.Println(restartError)
return
}
addObjRsp := inspectHTTPResponse(restartResponse)
if restartResponse != nil {
asserter.Equal(
204,
restartResponse.StatusCode,
addObjRsp,
)
}
}
func ListPoliciesWithBucket(bucketName string) (*http.Response, error) {
/*
Helper function to List Policies With Given Bucket
HTTP Verb: GET
URL: /bucket-policy/{bucket}
*/
request, err := http.NewRequest(
"GET", "http://localhost:9090/api/v1/bucket-policy/"+bucketName, nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
client := &http.Client{
Timeout: 2 * time.Second,
}
response, err := client.Do(request)
return response, err
}
func TestListPoliciesWithBucket(t *testing.T) {
// Test Variables
bucketName := "testlistpolicieswithbucket"
asserter := assert.New(t)
// Test
response, err := ListPoliciesWithBucket(bucketName)
asserter.Nil(err)
if err != nil {
log.Println(err)
return
}
parsedResponse := inspectHTTPResponse(response)
if response != nil {
asserter.Equal(
200,
response.StatusCode,
parsedResponse,
)
}
}
func ListUsersWithAccessToBucket(bucketName string) (*http.Response, error) {
/*
Helper function to List Users With Access to a Given Bucket
HTTP Verb: GET
URL: /bucket-users/{bucket}
*/
request, err := http.NewRequest(
"GET", "http://localhost:9090/api/v1/bucket-users/"+bucketName, nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
client := &http.Client{
Timeout: 2 * time.Second,
}
response, err := client.Do(request)
return response, err
}
func TestListUsersWithAccessToBucket(t *testing.T) {
// Test Variables
bucketName := "testlistuserswithaccesstobucket1"
asserter := assert.New(t)
// Test
response, err := ListUsersWithAccessToBucket(bucketName)
asserter.Nil(err)
if err != nil {
log.Println(err)
return
}
parsedResponse := inspectHTTPResponse(response)
if response != nil {
asserter.Equal(
200,
response.StatusCode,
parsedResponse,
)
}
}
func TestGetNodes(t *testing.T) {
asserter := assert.New(t)
getNodesResponse, getNodesError := GetNodes()
asserter.Nil(getNodesError)
if getNodesError != nil {
log.Println(getNodesError)
return
}
addObjRsp := inspectHTTPResponse(getNodesResponse)
if getNodesResponse != nil {
asserter.Equal(
200,
getNodesResponse.StatusCode,
addObjRsp,
)
}
}
func ArnList() (*http.Response, error) {
/*
Helper function to get arn list
HTTP Verb: GET
URL: /api/v1/admin/arns
*/
request, err := http.NewRequest(
"GET", "http://localhost:9090/api/v1/admin/arns", nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
client := &http.Client{
Timeout: 2 * time.Second,
}
response, err := client.Do(request)
return response, err
}
func TestArnList(t *testing.T) {
asserter := assert.New(t)
resp, err := ArnList()
asserter.Nil(err)
if err != nil {
log.Println(err)
return
}
objRsp := inspectHTTPResponse(resp)
if resp != nil {
asserter.Equal(
200,
resp.StatusCode,
objRsp,
)
}
}
func ExportConfig() (*http.Response, error) {
request, err := http.NewRequest(
"GET", "http://localhost:9090/api/v1/configs/export", nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
client := &http.Client{
Timeout: 2 * time.Second,
}
response, err := client.Do(request)
return response, err
}
func ImportConfig() (*http.Response, error) {
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
formFile, _ := writer.CreateFormFile("file", "sample-import-config.txt")
fileDir, _ := os.Getwd()
fileName := "sample-import-config.txt"
filePath := path.Join(fileDir, fileName)
file, _ := os.Open(filePath)
io.Copy(formFile, file)
writer.Close()
request, err := http.NewRequest(
"POST", "http://localhost:9090/api/v1/configs/import",
bytes.NewReader(body.Bytes()),
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{
Timeout: 2 * time.Second,
}
rsp, _ := client.Do(request)
if rsp.StatusCode != http.StatusOK {
log.Printf("Request failed with response code: %d", rsp.StatusCode)
}
return rsp, err
}
func TestExportConfig(t *testing.T) {
asserter := assert.New(t)
resp, err := ExportConfig()
asserter.Nil(err)
objRsp := inspectHTTPResponse(resp)
if resp != nil {
asserter.Equal(
200,
resp.StatusCode,
objRsp,
)
}
}
func TestImportConfig(t *testing.T) {
asserter := assert.New(t)
resp, err := ImportConfig()
asserter.Nil(err)
objRsp := inspectHTTPResponse(resp)
if resp != nil {
asserter.Equal(
200,
resp.StatusCode,
objRsp,
)
}
}

View File

@@ -18,9 +18,10 @@ package integration
import (
"bytes"
b64 "encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
@@ -31,17 +32,31 @@ import (
"github.com/go-openapi/loads"
"github.com/minio/console/restapi"
"github.com/minio/console/restapi/operations"
"github.com/minio/console/models"
"github.com/stretchr/testify/assert"
)
var token string
func initConsoleServer() (*restapi.Server, error) {
func encodeBase64(fileName string) string {
/*
Helper function to encode in base64 the file name so we can get the path
*/
path := b64.StdEncoding.EncodeToString([]byte(fileName))
return path
}
//os.Setenv("CONSOLE_MINIO_SERVER", "localhost:9000")
func inspectHTTPResponse(httpResponse *http.Response) string {
/*
Helper function to inspect the content of a HTTP response.
*/
b, err := io.ReadAll(httpResponse.Body)
if err != nil {
log.Fatalln(err)
}
return "Http Response: " + string(b)
}
func initConsoleServer() (*restapi.Server, error) {
// os.Setenv("CONSOLE_MINIO_SERVER", "localhost:9000")
swaggerSpec, err := loads.Embedded(restapi.SwaggerJSON, restapi.FlatSwaggerJSON)
if err != nil {
@@ -63,7 +78,7 @@ func initConsoleServer() (*restapi.Server, error) {
// register all APIs
server.ConfigureAPI()
//restapi.GlobalRootCAs, restapi.GlobalPublicCerts, restapi.GlobalTLSCertsManager = globalRootCAs, globalPublicCerts, globalTLSCerts
// restapi.GlobalRootCAs, restapi.GlobalPublicCerts, restapi.GlobalTLSCertsManager = globalRootCAs, globalPublicCerts, globalTLSCerts
consolePort, _ := strconv.Atoi("9090")
@@ -76,7 +91,6 @@ func initConsoleServer() (*restapi.Server, error) {
}
func TestMain(m *testing.M) {
// start console server
go func() {
fmt.Println("start server")
@@ -87,7 +101,6 @@ func TestMain(m *testing.M) {
return
}
srv.Serve()
}()
fmt.Println("sleeping")
@@ -116,7 +129,6 @@ func TestMain(m *testing.M) {
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
@@ -146,7 +158,7 @@ func TestMain(m *testing.M) {
requestDataBody = bytes.NewReader(requestDataJSON)
// get list of buckets
// delete bucket
request, err = http.NewRequest("DELETE", "http://localhost:9090/api/v1/buckets/test1", requestDataBody)
if err != nil {
log.Println(err)
@@ -168,321 +180,3 @@ func TestMain(m *testing.M) {
os.Exit(code)
}
func TestAddBucket(t *testing.T) {
assert := assert.New(t)
client := &http.Client{
Timeout: 2 * time.Second,
}
requestDataAdd := map[string]interface{}{
"name": "test1",
"versioning": false,
"locking": false,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
// get list of buckets
request, err := http.NewRequest("POST", "http://localhost:9090/api/v1/buckets", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(201, response.StatusCode, "Status Code is incorrect")
}
}
func TestGetBucket(t *testing.T) {
assert := assert.New(t)
client := &http.Client{
Timeout: 2 * time.Second,
}
requestDataAdd := map[string]interface{}{
"name": "test3",
"versioning": false,
"locking": false,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
// put bucket
request, err := http.NewRequest("POST", "http://localhost:9090/api/v1/buckets", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
// get bucket
request, err = http.NewRequest("GET", "http://localhost:9090/api/v1/buckets/test3", nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err = client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(200, response.StatusCode, "Status Code is incorrect")
}
}
func TestSetBucketTags(t *testing.T) {
assert := assert.New(t)
client := &http.Client{
Timeout: 2 * time.Second,
}
requestDataAdd := map[string]interface{}{
"name": "test4",
"versioning": false,
"locking": false,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
// put bucket
request, err := http.NewRequest("POST", "http://localhost:9090/api/v1/buckets", requestDataBody)
request.Close = true
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
requestDataTags := map[string]interface{}{
"tags": map[string]interface{}{
"test": "TAG",
},
}
requestTagsJSON, _ := json.Marshal(requestDataTags)
requestTagsBody := bytes.NewBuffer(requestTagsJSON)
request, err = http.NewRequest(http.MethodPut, "http://localhost:9090/api/v1/buckets/test4/tags", requestTagsBody)
request.Close = true
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err = client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
// get bucket
request, err = http.NewRequest("GET", "http://localhost:9090/api/v1/buckets/test4", nil)
request.Close = true
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err = client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
bodyBytes, _ := ioutil.ReadAll(response.Body)
bucket := models.Bucket{}
err = json.Unmarshal(bodyBytes, &bucket)
if err != nil {
log.Println(err)
}
assert.Equal("TAG", bucket.Details.Tags["test"], "Failed to add tag")
}
func TestBucketVersioning(t *testing.T) {
assert := assert.New(t)
client := &http.Client{
Timeout: 2 * time.Second,
}
request, err := http.NewRequest("GET", "http://localhost:9090/api/v1/session", nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
response, err := client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
var distributedSystem bool
if response != nil {
bodyBytes, _ := ioutil.ReadAll(response.Body)
sessionResponse := models.SessionResponse{}
err = json.Unmarshal(bodyBytes, &sessionResponse)
if err != nil {
log.Println(err)
}
distributedSystem = sessionResponse.DistributedMode
}
requestDataVersioning := map[string]interface{}{
"name": "test2",
"versioning": true,
"locking": false,
}
requestDataJSON, _ := json.Marshal(requestDataVersioning)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err = http.NewRequest("POST", "http://localhost:9090/api/v1/buckets", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err = client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
fmt.Println("Versioned bucket creation test status:", response.Status)
if distributedSystem {
assert.Equal(201, response.StatusCode, "Versioning test Status Code is incorrect - bucket failed to create")
} else {
assert.NotEqual(201, response.StatusCode, "Versioning test Status Code is incorrect - versioned bucket created on non-distributed system")
}
request, err = http.NewRequest("DELETE", "http://localhost:9090/api/v1/buckets/test2", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err = client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("DELETE StatusCode:", response.StatusCode)
}
}
func TestBucketsGet(t *testing.T) {
assert := assert.New(t)
client := &http.Client{
Timeout: 2 * time.Second,
}
// get list of buckets
request, err := http.NewRequest("GET", "http://localhost:9090/api/v1/buckets", nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
response, err := client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(200, response.StatusCode, "Status Code is incorrect")
bodyBytes, _ := ioutil.ReadAll(response.Body)
listBuckets := models.ListBucketsResponse{}
err = json.Unmarshal(bodyBytes, &listBuckets)
if err != nil {
log.Println(err)
assert.Nil(err)
}
assert.Greater(len(listBuckets.Buckets), 0, "No bucket was returned")
assert.Greater(listBuckets.Total, int64(0), "Total buckets is 0")
}
}

250
integration/config_test.go Normal file
View File

@@ -0,0 +1,250 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func Test_ConfigAPI(t *testing.T) {
assert := assert.New(t)
tests := []struct {
name string
expectedStatus int
expectedError error
}{
{
name: "Config - Valid",
expectedStatus: 200,
expectedError: nil,
},
}
client := &http.Client{
Timeout: 3 * time.Second,
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
request, err := http.NewRequest("GET", "http://localhost:9090/api/v1/configs", nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}
func Test_GetConfigAPI(t *testing.T) {
assert := assert.New(t)
type args struct {
name string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Get Config - Valid",
args: args{
name: "storage_class",
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "Get Config - Invalid",
args: args{
name: "asdf",
},
expectedStatus: 404,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1/configs/%s", tt.args.name), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}
func Test_SetConfigAPI(t *testing.T) {
assert := assert.New(t)
type args struct {
name string
keyValues []map[string]interface{}
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Set Config - Valid",
args: args{
name: "region",
keyValues: []map[string]interface{}{{"key": "name", "value": "testServer"}, {"key": "region", "value": "us-west-1"}},
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "Set Config - Invalid",
args: args{
name: "regiontest",
keyValues: []map[string]interface{}{{"key": "name", "value": "testServer"}, {"key": "region", "value": "us-west-1"}},
},
expectedStatus: 500,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataPolicy["key_values"] = tt.args.keyValues
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT", fmt.Sprintf("http://localhost:9090/api/v1/configs/%s", tt.args.name), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}
func Test_ResetConfigAPI(t *testing.T) {
assert := assert.New(t)
type args struct {
name string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Reset Config - Valid",
args: args{
name: "region",
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "Reset Config - Invalid",
args: args{
name: "regiontest",
},
expectedStatus: 500,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST", fmt.Sprintf("http://localhost:9090/api/v1/configs/%s/reset", tt.args.name), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}

351
integration/groups_test.go Normal file
View File

@@ -0,0 +1,351 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"log"
"net/http"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func Test_AddGroupAPI(t *testing.T) {
assert := assert.New(t)
AddUser("member1", "testtest", []string{}, []string{"consoleAdmin"})
type args struct {
group string
members []string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Create Group - Valid",
args: args{
group: "test",
members: []string{"member1"},
},
expectedStatus: 201,
expectedError: nil,
},
{
name: "Create Group - Invalid",
args: args{
group: "test",
members: []string{},
},
expectedStatus: 400,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataPolicy["group"] = tt.args.group
requestDataPolicy["members"] = tt.args.members
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST", "http://localhost:9090/api/v1/groups", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}
func Test_GetGroupAPI(t *testing.T) {
assert := assert.New(t)
AddUser("member2", "testtest", []string{}, []string{"consoleAdmin"})
AddGroup("getgroup1", []string{"member2"})
type args struct {
api string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Get Group - Valid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("getgroup1")),
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "Get Group - Invalid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("askfjalkd")),
},
expectedStatus: 500,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1/group/%s", tt.args.api), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}
func Test_ListGroupsAPI(t *testing.T) {
assert := assert.New(t)
tests := []struct {
name string
expectedStatus int
expectedError error
}{
{
name: "Get Group - Valid",
expectedStatus: 200,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"GET", "http://localhost:9090/api/v1/groups", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}
func Test_PutGroupsAPI(t *testing.T) {
assert := assert.New(t)
AddUser("member3", "testtest", []string{}, []string{"consoleAdmin"})
AddGroup("putgroup1", []string{})
type args struct {
api string
members []string
status string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Put Group - Valid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("putgroup1")),
members: []string{"member3"},
status: "enabled",
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "Put Group - Invalid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("gdgfdfgd")),
members: []string{"member3"},
status: "enabled",
},
expectedStatus: 500,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataPolicy["members"] = tt.args.members
requestDataPolicy["status"] = tt.args.status
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT", fmt.Sprintf("http://localhost:9090/api/v1/group/%s", tt.args.api), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}
func Test_DeleteGroupAPI(t *testing.T) {
assert := assert.New(t)
AddGroup("grouptests1", []string{})
type args struct {
api string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
verb string
}{
{
name: "Delete Group - Valid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("grouptests1")),
},
verb: "DELETE",
expectedStatus: 204,
expectedError: nil,
},
{
name: "Delete Group - Invalid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("grouptests12345")),
},
verb: "DELETE",
expectedStatus: 404,
expectedError: nil,
},
{
name: "Access Group After Delete - Invalid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("grouptests1")),
},
verb: "GET",
expectedStatus: 500,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
tt.verb, fmt.Sprintf("http://localhost:9090/api/v1/group/%s", tt.args.api), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}

106
integration/inspect_test.go Normal file
View File

@@ -0,0 +1,106 @@
package integration
import (
"fmt"
"log"
"net/http"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func Inspect(volume string, file string, enc bool) (*http.Response, error) {
requestURL := fmt.Sprintf("http://localhost:9090/api/v1/admin/inspect?volume=%s&file=%s&encrypt=%t", volume, file, enc)
request, err := http.NewRequest(
"GET", requestURL, nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
client := &http.Client{
Timeout: 2 * time.Second,
}
response, err := client.Do(request)
return response, err
}
func TestInspect(t *testing.T) {
assert := assert.New(t)
type args struct {
volume string
file string
encrypt bool
}
// Inspect returns successful response always
tests := []struct {
name string
args args
expStatusCode int
expectedError bool
}{
{
name: "Test Invalid Path",
args: args{
volume: "/test-with-slash",
file: "/test-with-slash",
encrypt: false,
},
expStatusCode: 200,
expectedError: false,
},
{
name: "Test Invalid characters in Path",
args: args{
volume: "//test",
file: "//bucket",
encrypt: false,
},
expStatusCode: 200,
expectedError: true,
},
{
name: "Test valid bucket",
args: args{
volume: "test-bucket",
file: "test.txt",
encrypt: true,
},
expStatusCode: 200,
expectedError: false,
},
{
name: "Test Empty Path", // Un processable entity error
args: args{
volume: "",
file: "",
encrypt: false,
},
expStatusCode: 422,
expectedError: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
resp, err := Inspect(tt.args.volume, tt.args.file, tt.args.encrypt)
if tt.expectedError {
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
}
if resp != nil {
assert.Equal(
tt.expStatusCode,
resp.StatusCode,
)
}
})
}
}

View File

@@ -17,8 +17,10 @@
package integration
import (
"bytes"
"encoding/json"
"io/ioutil"
"fmt"
"io"
"log"
"net/http"
"testing"
@@ -54,7 +56,7 @@ func TestLoginStrategy(t *testing.T) {
}
if response != nil {
bodyBytes, _ := ioutil.ReadAll(response.Body)
bodyBytes, _ := io.ReadAll(response.Body)
loginDetails := models.LoginDetails{}
@@ -67,5 +69,94 @@ func TestLoginStrategy(t *testing.T) {
assert.Equal(models.LoginDetailsLoginStrategyForm, loginDetails.LoginStrategy, "Login Details don't match")
}
}
func TestLogout(t *testing.T) {
assert := assert.New(t)
// image for now:
// minio: 9000
// console: 9090
client := &http.Client{
Timeout: 2 * time.Second,
}
requestData := map[string]string{
"accessKey": "minioadmin",
"secretKey": "minioadmin",
}
requestDataJSON, _ := json.Marshal(requestData)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest("POST", "http://localhost:9090/api/v1/login", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
assert.NotNil(response, "Login response is nil")
assert.Nil(err, "Login errored out")
var loginToken string
for _, cookie := range response.Cookies() {
if cookie.Name == "token" {
loginToken = cookie.Value
break
}
}
if loginToken == "" {
log.Println("authentication token not found in cookies response")
return
}
logoutRequest := bytes.NewReader([]byte("{}"))
request, err = http.NewRequest("POST", "http://localhost:9090/api/v1/logout", logoutRequest)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", loginToken))
request.Header.Add("Content-Type", "application/json")
response, err = client.Do(request)
assert.NotNil(response, "Logout response is nil")
assert.Nil(err, "Logout errored out")
assert.Equal(response.StatusCode, 200)
}
func TestBadLogin(t *testing.T) {
assert := assert.New(t)
client := &http.Client{
Timeout: 2 * time.Second,
}
requestData := map[string]string{
"accessKey": "minioadmin",
"secretKey": "minioadminbad",
}
requestDataJSON, _ := json.Marshal(requestData)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest("POST", "http://localhost:9090/api/v1/login", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
assert.Equal(401, response.StatusCode, "Login request not rejected")
assert.NotNil(response, "Login response is nil")
assert.Nil(err, "Login errored out")
}

196
integration/objects_test.go Normal file
View File

@@ -0,0 +1,196 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"context"
"encoding/base64"
"fmt"
"log"
"math/rand"
"net/http"
"strings"
"testing"
"time"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/stretchr/testify/assert"
)
func TestObjectGet(t *testing.T) {
// for setup we'll create a bucket and upload a file
endpoint := "localhost:9000"
accessKeyID := "minioadmin"
secretAccessKey := "minioadmin"
// Initialize minio client object.
minioClient, err := minio.New(endpoint, &minio.Options{
Creds: credentials.NewStaticV4(accessKeyID, secretAccessKey, ""),
Secure: false,
})
if err != nil {
log.Fatalln(err)
}
bucketName := fmt.Sprintf("testbucket-%d", rand.Intn(1000-1)+1)
err = minioClient.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true})
if err != nil {
fmt.Println(err)
}
// upload a simple file
fakeFile := "12345678"
fileReader := strings.NewReader(fakeFile)
_, err = minioClient.PutObject(
context.Background(),
bucketName,
"myobject", fileReader, int64(len(fakeFile)), minio.PutObjectOptions{ContentType: "application/octet-stream"})
if err != nil {
fmt.Println(err)
return
}
_, err = minioClient.PutObject(
context.Background(),
bucketName,
"myobject.jpg", fileReader, int64(len(fakeFile)), minio.PutObjectOptions{ContentType: "application/octet-stream"})
if err != nil {
fmt.Println(err)
return
}
assert := assert.New(t)
type args struct {
encodedPrefix string
versionID string
bytesRange string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Preview Object",
args: args{
encodedPrefix: base64.StdEncoding.EncodeToString([]byte("myobject")),
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "Preview image",
args: args{
encodedPrefix: base64.StdEncoding.EncodeToString([]byte("myobject.jpg")),
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "Get Range of bytes",
args: args{
encodedPrefix: base64.StdEncoding.EncodeToString([]byte("myobject.jpg")),
bytesRange: "bytes=1-4",
},
expectedStatus: 206,
expectedError: nil,
},
{
name: "Get Range of bytes empty start",
args: args{
encodedPrefix: base64.StdEncoding.EncodeToString([]byte("myobject.jpg")),
bytesRange: "bytes=-4",
},
expectedStatus: 206,
expectedError: nil,
},
{
name: "Get Invalid Range of bytes",
args: args{
encodedPrefix: base64.StdEncoding.EncodeToString([]byte("myobject.jpg")),
bytesRange: "bytes=9-12",
},
expectedStatus: 400,
expectedError: nil,
},
{
name: "Get Larger Range of bytes empty start",
args: args{
encodedPrefix: base64.StdEncoding.EncodeToString([]byte("myobject.jpg")),
bytesRange: "bytes=-12",
},
expectedStatus: 206,
expectedError: nil,
},
{
name: "Get invalid seek start Range of bytes",
args: args{
encodedPrefix: base64.StdEncoding.EncodeToString([]byte("myobject.jpg")),
bytesRange: "bytes=12-16",
},
expectedStatus: 400,
expectedError: nil,
},
{
name: "Bad Preview Object",
args: args{
encodedPrefix: "garble",
},
expectedStatus: 400,
expectedError: nil,
},
{
name: "Bad Version Preview Object",
args: args{
encodedPrefix: base64.StdEncoding.EncodeToString([]byte("myobject")),
versionID: "garble",
},
expectedStatus: 400,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
destination := fmt.Sprintf("/api/v1/buckets/%s/objects/download?preview=true&prefix=%s&version_id=%s", bucketName, tt.args.encodedPrefix, tt.args.versionID)
finalURL := fmt.Sprintf("http://localhost:9090%s", destination)
request, err := http.NewRequest("GET", finalURL, nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
if tt.args.bytesRange != "" {
request.Header.Add("Range", tt.args.bytesRange)
}
response, err := client.Do(request)
assert.NotNil(response, fmt.Sprintf("%s response object is nil", tt.name))
assert.Nil(err, fmt.Sprintf("%s returned an error: %v", tt.name, err))
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, fmt.Sprintf("%s returned the wrong status code", tt.name))
}
})
}
}

862
integration/policy_test.go Normal file
View File

@@ -0,0 +1,862 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"testing"
"time"
"github.com/go-openapi/swag"
"github.com/stretchr/testify/assert"
)
func AddPolicy(name, definition string) (*http.Response, error) {
/*
This is an atomic function to add user and can be reused across
different functions.
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataAdd := map[string]interface{}{
"name": name,
"policy": definition,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST", "http://localhost:9090/api/v1/policies", requestDataBody)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func SetPolicy(policies []string, entityName, entityType string) (*http.Response, error) {
/*
This is an atomic function to add user and can be reused across
different functions.
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataAdd := map[string]interface{}{
"name": policies,
"entityType": entityType,
"entityName": entityName,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT", "http://localhost:9090/api/v1/set-policy", requestDataBody)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func Test_AddPolicyAPI(t *testing.T) {
assert := assert.New(t)
type args struct {
api string
name string
policy *string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Create Policy - Valid",
args: args{
api: "/policies",
name: "test",
policy: swag.String(`
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`),
},
expectedStatus: 201,
expectedError: nil,
},
{
name: "Create Policy - Invalid",
args: args{
api: "/policies",
name: "test2",
policy: swag.String(`
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation"
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`),
},
expectedStatus: 500,
expectedError: nil,
},
{
name: "Create Policy - Space in Name",
args: args{
api: "/policies",
name: "space test",
policy: swag.String(`
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`),
},
expectedStatus: 400,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataPolicy["name"] = tt.args.name
if tt.args.policy != nil {
requestDataPolicy["policy"] = *tt.args.policy
}
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}
func Test_SetPolicyAPI(t *testing.T) {
assert := assert.New(t)
AddUser("policyuser1", "testtest", []string{}, []string{"readwrite"})
AddGroup("testgroup123", []string{})
AddPolicy("setpolicytest", `
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`)
type args struct {
api string
entityType string
entityName string
policyName []string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Set Policy - Valid",
args: args{
api: "/set-policy",
policyName: []string{"setpolicytest"},
entityType: "user",
entityName: "policyuser1",
},
expectedStatus: 204,
expectedError: nil,
},
{
name: "Set Policy - Invalid",
args: args{
api: "/set-policy",
policyName: []string{"test3"},
entityType: "user",
entityName: "policyuser1",
},
expectedStatus: 500,
expectedError: nil,
},
{
name: "Set Policy Group - Valid",
args: args{
api: "/set-policy",
policyName: []string{"setpolicytest"},
entityType: "group",
entityName: "testgroup123",
},
expectedStatus: 204,
expectedError: nil,
},
{
name: "Set Policy Group - Invalid",
args: args{
api: "/set-policy",
policyName: []string{"test3"},
entityType: "group",
entityName: "testgroup123",
},
expectedStatus: 500,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataPolicy["entityName"] = tt.args.entityName
requestDataPolicy["entityType"] = tt.args.entityType
if tt.args.policyName != nil {
requestDataPolicy["name"] = tt.args.policyName
}
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}
func Test_SetPolicyMultipleAPI(t *testing.T) {
assert := assert.New(t)
AddUser("policyuser2", "testtest", []string{}, []string{"readwrite"})
AddUser("policyuser3", "testtest", []string{}, []string{"readwrite"})
AddGroup("testgroup1234", []string{})
AddPolicy("setpolicytest2", `
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`)
type args struct {
api string
users []string
groups []string
name []string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Set Policy - Valid",
args: args{
api: "/set-policy-multi",
name: []string{"setpolicytest2"},
users: []string{"policyuser2", "policyuser3"},
},
expectedStatus: 204,
expectedError: nil,
},
{
name: "Set Policy - Invalid",
args: args{
api: "/set-policy-multi",
name: []string{"test3"},
users: []string{"policyuser2", "policyuser3"},
},
expectedStatus: 500,
expectedError: nil,
},
{
name: "Set Policy Group - Valid",
args: args{
api: "/set-policy-multi",
name: []string{"setpolicytest2"},
groups: []string{"testgroup1234"},
},
expectedStatus: 204,
expectedError: nil,
},
{
name: "Set Policy Group - Valid",
args: args{
api: "/set-policy-multi",
name: []string{"setpolicytest23"},
groups: []string{"testgroup1234"},
},
expectedStatus: 500,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataPolicy := map[string]interface{}{}
requestDataPolicy["name"] = tt.args.name
requestDataPolicy["users"] = tt.args.users
requestDataPolicy["groups"] = tt.args.groups
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}
func Test_ListPoliciesAPI(t *testing.T) {
assert := assert.New(t)
type args struct {
api string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "List Policies",
args: args{
api: "/policies",
},
expectedStatus: 200,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}
func Test_GetPolicyAPI(t *testing.T) {
assert := assert.New(t)
AddPolicy("getpolicytest", `
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`)
type args struct {
api string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Get Policies - Invalid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("test3")),
},
expectedStatus: 500,
expectedError: nil,
},
{
name: "Get Policies - Valid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("getpolicytest")),
},
expectedStatus: 200,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1/policy/%s", tt.args.api), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}
func Test_PolicyListUsersAPI(t *testing.T) {
assert := assert.New(t)
AddUser("policyuser4", "testtest", []string{}, []string{"readwrite"})
AddPolicy("policylistusers", `
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`)
SetPolicy([]string{"policylistusers"}, "policyuser4", "user")
type args struct {
api string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "List Users for Policy - Valid",
args: args{
api: "/policies/" + base64.StdEncoding.EncodeToString([]byte("policylistusers")) + "/users",
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "List Users for Policy - Invalid",
args: args{
api: "/policies/" + base64.StdEncoding.EncodeToString([]byte("test2")) + "/users",
},
expectedStatus: 404,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
bodyBytes, _ := io.ReadAll(response.Body)
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
if response.StatusCode == 200 {
assert.Equal("[\"policyuser4\"]\n", string(bodyBytes))
}
}
})
}
}
func Test_PolicyListGroupsAPI(t *testing.T) {
assert := assert.New(t)
AddGroup("testgroup12345", []string{})
AddPolicy("policylistgroups", `
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`)
SetPolicy([]string{"policylistgroups"}, "testgroup12345", "group")
type args struct {
api string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "List Users for Policy - Valid",
args: args{
api: "/policies/" + base64.StdEncoding.EncodeToString([]byte("policylistgroups")) + "/groups",
},
expectedStatus: 200,
expectedError: nil,
},
{
name: "List Users for Policy - Invalid",
args: args{
api: "/policies/" + base64.StdEncoding.EncodeToString([]byte("test3")) + "/groups",
},
expectedStatus: 404,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
bodyBytes, _ := io.ReadAll(response.Body)
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
if response.StatusCode == 200 {
assert.Equal("[\"testgroup12345\"]\n", string(bodyBytes))
}
}
})
}
}
func Test_DeletePolicyAPI(t *testing.T) {
assert := assert.New(t)
AddPolicy("testdelete", `
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`)
type args struct {
api string
method string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Delete Policies - Valid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("testdelete")),
method: "DELETE",
},
expectedStatus: 204,
expectedError: nil,
},
{
name: "Get Policy After Delete - Invalid",
args: args{
api: base64.StdEncoding.EncodeToString([]byte("testdelete")),
method: "GET",
},
expectedStatus: 500,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
tt.args.method, fmt.Sprintf("http://localhost:9090/api/v1/policy/%s", tt.args.api), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}
func Test_GetAUserPolicyAPI(t *testing.T) {
assert := assert.New(t)
// Create a User with a Policy to use for testing
groups := []string{}
policies := []string{"readwrite"}
_, err := AddUser("getuserpolicyuser", "secretKey", groups, policies)
if err != nil {
log.Println(err)
return
}
// encode usernames to pass to api
bName := []byte("getuserpolicyuser")
fName := []byte("failname")
encodedName := base64.URLEncoding.EncodeToString(bName)
encodedFailName := base64.URLEncoding.EncodeToString(fName)
type args struct {
api string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Get User Policy - Invalid",
args: args{
api: "/user/" + encodedFailName + "/policies",
},
expectedStatus: 401,
expectedError: nil,
},
{
name: "Get User Policy - Valid",
args: args{
api: "/user/" + encodedName + "/policies",
},
expectedStatus: 200,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}

View File

@@ -0,0 +1,93 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"archive/zip"
"bytes"
"fmt"
"log"
"net/http"
"testing"
"github.com/minio/websocket"
"github.com/stretchr/testify/assert"
)
func TestStartProfiling(t *testing.T) {
testAssert := assert.New(t)
tests := []struct {
name string
}{
{
name: "start/stop profiling",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
files := map[string]bool{
"profile-127.0.0.1:9000-goroutines.txt": false,
"profile-127.0.0.1:9000-goroutines-before.txt": false,
"profile-127.0.0.1:9000-goroutines-before,debug=2.txt": false,
"profile-127.0.0.1:9000-threads-before.pprof": false,
"profile-127.0.0.1:9000-mem.pprof": false,
"profile-127.0.0.1:9000-threads.pprof": false,
"profile-127.0.0.1:9000-cpu.pprof": false,
"profile-127.0.0.1:9000-mem-before.pprof": false,
"profile-127.0.0.1:9000-block.pprof": false,
"profile-127.0.0.1:9000-trace.trace": false,
"profile-127.0.0.1:9000-mutex.pprof": false,
"profile-127.0.0.1:9000-mutex-before.pprof": false,
}
wsDestination := "/ws/profile?types=cpu,mem,block,mutex,trace,threads,goroutines"
wsFinalURL := fmt.Sprintf("ws://localhost:9090%s", wsDestination)
ws, _, err := websocket.DefaultDialer.Dial(wsFinalURL, nil)
if err != nil {
log.Println(err)
return
}
defer ws.Close()
_, zipFileBytes, err := ws.ReadMessage()
if err != nil {
log.Println(err)
return
}
filetype := http.DetectContentType(zipFileBytes)
testAssert.Equal("application/zip", filetype)
zipReader, err := zip.NewReader(bytes.NewReader(zipFileBytes), int64(len(zipFileBytes)))
if err != nil {
testAssert.Nil(err, fmt.Sprintf("%s returned an error: %v", tt.name, err))
}
// Read all the files from zip archive
for _, zipFile := range zipReader.File {
files[zipFile.Name] = true
}
for k, v := range files {
testAssert.Equal(true, v, fmt.Sprintf("%s : compressed file expected to have %v file inside", tt.name, k))
}
})
}
}

View File

@@ -0,0 +1,28 @@
subnet license= api_key= proxy=
# callhome enable=off frequency=24h
# site name= region=
# api requests_max=0 requests_deadline=10s cluster_deadline=10s cors_allow_origin=* remote_transport_deadline=2h list_quorum=strict replication_priority=auto transition_workers=100 stale_uploads_cleanup_interval=6h stale_uploads_expiry=24h delete_cleanup_interval=5m disable_odirect=off gzip_objects=off
# scanner speed=default
# compression enable=off allow_encryption=off extensions=.txt,.log,.csv,.json,.tar,.xml,.bin mime_types=text/*,application/json,application/xml,binary/octet-stream
# identity_openid enable= display_name= config_url= client_id= client_secret= claim_name=policy claim_userinfo= role_policy= claim_prefix= redirect_uri= redirect_uri_dynamic=off scopes= vendor= keycloak_realm= keycloak_admin_url=
# identity_ldap server_addr= srv_record_name= user_dn_search_base_dn= user_dn_search_filter= group_search_filter= group_search_base_dn= tls_skip_verify=off server_insecure=off server_starttls=off lookup_bind_dn= lookup_bind_password=
# identity_tls skip_verify=off
# identity_plugin url= auth_token= role_policy= role_id=
# policy_plugin url= auth_token= enable_http2=off
# logger_webhook enable=off endpoint= auth_token= client_cert= client_key= queue_size=100000
# audit_webhook enable=off endpoint= auth_token= client_cert= client_key= queue_size=100000
# audit_kafka enable=off topic= brokers= sasl_username= sasl_password= sasl_mechanism=plain client_tls_cert= client_tls_key= tls_client_auth=0 sasl=off tls=off tls_skip_verify=off version=
# notify_webhook enable=off endpoint= auth_token= queue_limit=0 queue_dir= client_cert= client_key=
# notify_amqp enable=off url= exchange= exchange_type= routing_key= mandatory=off durable=off no_wait=off internal=off auto_deleted=off delivery_mode=0 publisher_confirms=off queue_limit=0 queue_dir=
# notify_kafka enable=off topic= brokers= sasl_username= sasl_password= sasl_mechanism=plain client_tls_cert= client_tls_key= tls_client_auth=0 sasl=off tls=off tls_skip_verify=off queue_limit=0 queue_dir= version=
# notify_mqtt enable=off broker= topic= password= username= qos=0 keep_alive_interval=0s reconnect_interval=0s queue_dir= queue_limit=0
# notify_nats enable=off address= subject= username= password= token= tls=off tls_skip_verify=off cert_authority= client_cert= client_key= ping_interval=0 jetstream=off streaming=off streaming_async=off streaming_max_pub_acks_in_flight=0 streaming_cluster_id= queue_dir= queue_limit=0
# notify_nsq enable=off nsqd_address= topic= tls=off tls_skip_verify=off queue_dir= queue_limit=0
# notify_mysql enable=off format=namespace dsn_string= table= queue_dir= queue_limit=0 max_open_connections=2
# notify_postgres enable=off format=namespace connection_string= table= queue_dir= queue_limit=0 max_open_connections=2
# notify_elasticsearch enable=off url= format=namespace index= queue_dir= queue_limit=0 username= password=
# notify_redis enable=off format=namespace address= key= password= queue_dir= queue_limit=0
# etcd endpoints= path_prefix= coredns_path=/skydns client_cert= client_cert_key=
# cache drives= exclude= expiry=90 quota=80 after=0 watermark_low=70 watermark_high=80 range=on commit=
# storage_class standard= rrs=EC:1
# heal bitrotscan=off max_sleep=1s max_io=100

View File

@@ -0,0 +1,406 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"log"
"net/http"
"testing"
"time"
"github.com/go-openapi/swag"
iampolicy "github.com/minio/pkg/iam/policy"
"github.com/stretchr/testify/assert"
)
func TestAddServiceAccount(t *testing.T) {
/*
This is an atomic API Test to add a user service account, the intention
is simple, add a user and make sure the response is 201 meaning that the
user got added successfully.
After test completion, it is expected that user is removed, so other
tests like users.ts can run over clean data and we don't collide against
it.
*/
assert := assert.New(t)
client := &http.Client{
Timeout: 3 * time.Second,
}
// Add service account
requestDataAddServiceAccount := map[string]interface{}{
"accessKey": "testuser1",
"secretKey": "password",
}
requestDataJSON, _ := json.Marshal(requestDataAddServiceAccount)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST", "http://localhost:9090/api/v1/service-account-credentials", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("POST StatusCode:", response.StatusCode)
assert.Equal(201, response.StatusCode, "Status Code is incorrect")
}
requestDataPolicy := map[string]interface{}{
"policy": `
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`,
}
requestDataJSON, _ = json.Marshal(requestDataPolicy)
requestDataBody = bytes.NewReader(requestDataJSON)
request, err = http.NewRequest(
"PUT", "http://localhost:9090/api/v1/service-accounts/"+base64.StdEncoding.EncodeToString([]byte("testuser1"))+"/policy", requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err = client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("POST StatusCode:", response.StatusCode)
assert.Equal(200, response.StatusCode, "Status Code is incorrect")
}
// Test policy
request, err = http.NewRequest(
"GET", "http://localhost:9090/api/v1/service-accounts/"+base64.StdEncoding.EncodeToString([]byte("testuser1"))+"/policy", nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err = client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("POST StatusCode:", response.StatusCode)
assert.Equal(200, response.StatusCode, "Status Code is incorrect")
buf := new(bytes.Buffer)
buf.ReadFrom(response.Body)
var actual *iampolicy.Policy
var expected *iampolicy.Policy
json.Unmarshal(buf.Bytes(), actual)
policy, err := json.Marshal(requestDataAddServiceAccount["policy"])
if err != nil {
log.Println(err)
return
}
json.Unmarshal(policy, expected)
assert.Equal(expected, actual)
}
// {{baseUrl}}/user?name=proident velit
// Investiga como se borra en el browser.
request, err = http.NewRequest(
"DELETE", "http://localhost:9090/api/v1/service-accounts/"+base64.StdEncoding.EncodeToString([]byte("testuser1")), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err = client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("DELETE StatusCode:", response.StatusCode)
assert.Equal(204, response.StatusCode, "has to be 204 when delete user")
}
}
func Test_ServiceAccountsAPI(t *testing.T) {
assert := assert.New(t)
type args struct {
api string
policy *string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Create Service Account - Default",
args: args{
api: "/service-accounts",
policy: nil,
},
expectedStatus: 201,
expectedError: nil,
},
{
name: "Create Service Account - Valid Policy",
args: args{
api: "/service-accounts",
policy: swag.String(`
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`),
},
expectedStatus: 201,
expectedError: nil,
},
{
name: "Create Service Account - Invalid Policy",
args: args{
api: "/service-accounts",
policy: swag.String(`
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation"
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}`),
},
expectedStatus: 500,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
// Add service account
requestDataPolicy := map[string]interface{}{}
if tt.args.policy != nil {
requestDataPolicy["policy"] = *tt.args.policy
}
requestDataJSON, _ := json.Marshal(requestDataPolicy)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), requestDataBody)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}
func DeleteMultipleServiceAccounts(serviceAccounts []string) (*http.Response, error) {
/*
Helper function to delete multiple service accounts
URL: http://localhost:9001/api/v1/service-accounts/delete-multi
HTTP Verb: DELETE
Data: ["U3RADB7J2ZZHELR0WSBB","ZE8H1HYOA6AVGKFCV6YU"]
Response: Status Code: 204 No Content
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataJSON, _ := json.Marshal(serviceAccounts)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"DELETE", "http://localhost:9090/api/v1/service-accounts/delete-multi", requestDataBody)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func TestCreateServiceAccountForUserWithCredentials(t *testing.T) {
/*
To test creation of service account for a user.
*/
// Test's variables
userName := "testcreateserviceaccountforuserwithcredentials1"
assert := assert.New(t)
policy := ""
serviceAccountLengthInBytes := 40 // As observed, update as needed
// 1. Create the user
groups := []string{}
policies := []string{}
secretKey := "testcreateserviceaccountforuserwithcrede"
response, err := AddUser(userName, "secretKey", groups, policies)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("StatusCode:", response.StatusCode)
assert.Equal(201, response.StatusCode, "Status Code is incorrect")
}
// Table driven testing part
type args struct {
accessKey string
}
tests := []struct {
name string
args args
expectedStatus int
}{
{
name: "Service Account With Valid Credentials",
expectedStatus: 201,
args: args{
accessKey: "testcreateserviceacc",
},
},
{
name: "Service Account With Invalid Credentials",
expectedStatus: 500,
args: args{
accessKey: "tooooooooooooooooooooolongggggggggggggggggg",
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// 2. Create the service account for the user
createServiceAccountWithCredentialsResponse,
createServiceAccountWithCredentialsError := CreateServiceAccountForUserWithCredentials(
userName,
policy,
tt.args.accessKey,
secretKey,
)
if createServiceAccountWithCredentialsError != nil {
log.Println(createServiceAccountWithCredentialsError)
assert.Fail("Error in createServiceAccountWithCredentialsError")
}
if createServiceAccountWithCredentialsResponse != nil {
fmt.Println("StatusCode:", createServiceAccountWithCredentialsResponse.StatusCode)
assert.Equal(
tt.expectedStatus, // different status expected per table's row
createServiceAccountWithCredentialsResponse.StatusCode,
inspectHTTPResponse(createServiceAccountWithCredentialsResponse),
)
}
// 3. Verify the service account for the user
listOfAccountsResponse,
listOfAccountsError := ReturnsAListOfServiceAccountsForAUser(userName)
if listOfAccountsError != nil {
log.Println(listOfAccountsError)
assert.Fail("Error in listOfAccountsError")
}
finalResponse := inspectHTTPResponse(listOfAccountsResponse)
if listOfAccountsResponse != nil {
fmt.Println("StatusCode:", listOfAccountsResponse.StatusCode)
assert.Equal(
200, listOfAccountsResponse.StatusCode,
finalResponse,
)
}
assert.Equal(len(finalResponse), serviceAccountLengthInBytes, finalResponse)
})
}
// Delete Multiple Service Accounts
serviceAccount := make([]string, 1)
serviceAccount[0] = "testcreateserviceacc"
response, err = DeleteMultipleServiceAccounts(serviceAccount)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("StatusCode:", response.StatusCode)
assert.Equal(
204,
response.StatusCode,
inspectHTTPResponse(response),
)
}
}

53
integration/tiers_test.go Normal file
View File

@@ -0,0 +1,53 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"fmt"
"log"
"net/http"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestTiersList(t *testing.T) {
assert := assert.New(t)
// image for now:
// minio: 9000
// console: 9090
client := &http.Client{
Timeout: 2 * time.Second,
}
request, err := http.NewRequest("GET", "http://localhost:9090/api/v1/admin/tiers", nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
assert.NotNil(response, "Tiers List response is nil")
assert.Nil(err, "Tiers List errored out")
assert.Equal(response.StatusCode, 200)
}

File diff suppressed because it is too large Load Diff

922
integration/users_test.go Normal file
View File

@@ -0,0 +1,922 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"strconv"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func AddUser(accessKey, secretKey string, groups, policies []string) (*http.Response, error) {
/*
This is an atomic function to add user and can be reused across
different functions.
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataAdd := map[string]interface{}{
"accessKey": accessKey,
"secretKey": secretKey,
"groups": groups,
"policies": policies,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST", "http://localhost:9090/api/v1/users", requestDataBody)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func DeleteUser(userName string) (*http.Response, error) {
userName = base64.StdEncoding.EncodeToString([]byte(userName))
/*
This is an atomic function to delete user and can be reused across
different functions.
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"DELETE", "http://localhost:9090/api/v1/user/"+userName, nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func ListUsers(offset, limit string) (*http.Response, error) {
/*
This is an atomic function to list users.
{{baseUrl}}/users?offset=-5480083&limit=-5480083
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET",
"http://localhost:9090/api/v1/users?offset="+offset+"&limit="+limit,
nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func GetUserInformation(userName string) (*http.Response, error) {
userName = base64.StdEncoding.EncodeToString([]byte(userName))
/*
Helper function to get user information via API:
{{baseUrl}}/user?name=proident velit
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET",
"http://localhost:9090/api/v1/user/"+userName,
nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func UpdateUserInformation(name, status string, groups []string) (*http.Response, error) {
name = base64.StdEncoding.EncodeToString([]byte(name))
/*
Helper function to update user information:
PUT: {{baseUrl}}/user?name=proident velit
Body:
{
"status": "nisi voluptate amet ea",
"groups": [
"ipsum eu cupidatat",
"aliquip non nulla"
]
}
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataAdd := map[string]interface{}{
"status": status,
"groups": groups,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT", "http://localhost:9090/api/v1/user/"+name, requestDataBody)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func RemoveUser(name string) (*http.Response, error) {
name = base64.StdEncoding.EncodeToString([]byte(name))
/*
Helper function to remove user.
DELETE: {{baseUrl}}/user?name=proident velit
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"DELETE", "http://localhost:9090/api/v1/user/"+name, nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func UpdateGroupsForAUser(userName string, groups []string) (*http.Response, error) {
userName = base64.StdEncoding.EncodeToString([]byte(userName))
/*
Helper function to update groups for a user
PUT: {{baseUrl}}/user/groups?name=username
{
"groups":[
"groupone",
"grouptwo"
]
}
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataAdd := map[string]interface{}{
"groups": groups,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT",
"http://localhost:9090/api/v1/user/"+userName+"/groups",
requestDataBody,
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func CreateServiceAccountForUser(userName, policy string) (*http.Response, error) {
userName = base64.StdEncoding.EncodeToString([]byte(userName))
/*
Helper function to Create Service Account for user
POST: api/v1/user/username/service-accounts
{
"policy": "ad magna"
}
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataAdd := map[string]interface{}{
"policy": policy,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST",
"http://localhost:9090/api/v1/user/"+userName+"/service-accounts",
requestDataBody,
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func CreateServiceAccountForUserWithCredentials(userName, policy, accessKey, secretKey string) (*http.Response, error) {
userName = base64.StdEncoding.EncodeToString([]byte(userName))
// Helper function to test "Create Service Account for User With Credentials" end point.
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataAdd := map[string]interface{}{
"policy": policy,
"accessKey": accessKey,
"secretKey": secretKey,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST",
"http://localhost:9090/api/v1/user/"+userName+"/service-account-credentials",
requestDataBody,
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func ReturnsAListOfServiceAccountsForAUser(userName string) (*http.Response, error) {
userName = base64.StdEncoding.EncodeToString([]byte(userName))
/*
Helper function to return a list of service accounts for a user.
GET: {{baseUrl}}/user/:name/service-accounts
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET",
"http://localhost:9090/api/v1/user/"+userName+"/service-accounts",
nil,
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func AddGroup(group string, members []string) (*http.Response, error) {
/*
Helper function to add a group.
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
requestDataAdd := map[string]interface{}{
"group": group,
"members": members,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"POST",
"http://localhost:9090/api/v1/groups",
requestDataBody,
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
return response, err
}
func UsersGroupsBulk(users, groups []string) (*http.Response, error) {
/*
Helper function to test Bulk functionality to Add Users to Groups.
PUT: {{baseUrl}}/users-groups-bulk
{
"users": [
"magna id",
"enim sit tempor incididunt"
],
"groups": [
"nisi est esse",
"fugiat eu"
]
}
*/
requestDataAdd := map[string]interface{}{
"users": users,
"groups": groups,
}
requestDataJSON, _ := json.Marshal(requestDataAdd)
requestDataBody := bytes.NewReader(requestDataJSON)
request, err := http.NewRequest(
"PUT",
"http://localhost:9090/api/v1/users-groups-bulk",
requestDataBody,
)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
client := &http.Client{
Timeout: 2 * time.Second,
}
response, err := client.Do(request)
return response, err
}
func TestAddUser(t *testing.T) {
/*
This is an API Test to add a user via api/v1/users, the intention
is simple, add a user and make sure the response is 201 meaning that the
user got added successfully.
After test completion, it is expected that user is removed, so other
tests like users.ts can run over clean data and we don't collide against
it.
*/
assert := assert.New(t)
// With no groups & no policies
groups := []string{}
policies := []string{}
response, err := AddUser("accessKey", "secretKey", groups, policies)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("POST StatusCode:", response.StatusCode)
assert.Equal(201, response.StatusCode, "Status Code is incorrect")
}
response, err = DeleteUser("accessKey")
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("DELETE StatusCode:", response.StatusCode)
assert.Equal(204, response.StatusCode, "has to be 204 when delete user")
}
}
func TestListUsers(t *testing.T) {
/*
This test is intended to list users via API.
1. First, it creates the users
2. Then, it lists the users <------ 200 is expected when listing them.
3. Finally, it deletes the users
*/
assert := assert.New(t)
// With no groups & no policies
groups := []string{}
policies := []string{}
// 1. Create the users
numberOfUsers := 5
for i := 1; i < numberOfUsers; i++ {
response, err := AddUser(
strconv.Itoa(i)+"accessKey"+strconv.Itoa(i),
"secretKey"+strconv.Itoa(i), groups, policies)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("POST StatusCode:", response.StatusCode)
assert.Equal(201, response.StatusCode,
"Status Code is incorrect on index: "+strconv.Itoa(i))
}
b, err := io.ReadAll(response.Body)
if err != nil {
log.Fatalln(err)
}
fmt.Println(string(b))
}
// 2. List the users
listResponse, listError := ListUsers("-5480083", "-5480083")
if listError != nil {
log.Fatalln(listError)
}
if listResponse != nil {
fmt.Println("POST StatusCode:", listResponse.StatusCode)
assert.Equal(200, listResponse.StatusCode,
"TestListUsers(): Status Code is incorrect when listing users")
}
b, err := io.ReadAll(listResponse.Body)
if err != nil {
log.Fatalln(err)
}
fmt.Println(string(b))
// 3. Delete the users
for i := 1; i < numberOfUsers; i++ {
response, err := DeleteUser(
strconv.Itoa(i) + "accessKey" + strconv.Itoa(i))
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("DELETE StatusCode:", response.StatusCode)
assert.Equal(204,
response.StatusCode, "has to be 204 when delete user")
}
}
}
func TestGetUserInfo(t *testing.T) {
/*
Test to get the user information via API.
*/
// 1. Create the user
fmt.Println("TestGetUserInfo(): 1. Create the user")
assert := assert.New(t)
groups := []string{}
policies := []string{}
response, err := AddUser("accessKey", "secretKey", groups, policies)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("POST StatusCode:", response.StatusCode)
assert.Equal(201, response.StatusCode, "Status Code is incorrect")
}
// 2. Get user information
fmt.Println("TestGetUserInfo(): 2. Get user information")
response, err = GetUserInformation("accessKey")
if err != nil {
log.Println(err)
assert.Fail("There was an error in the response")
return
}
// 3. Verify user information
fmt.Println("TestGetUserInfo(): 3. Verify user information")
if response != nil {
fmt.Println("POST StatusCode:", response.StatusCode)
assert.Equal(200, response.StatusCode, "Status Code is incorrect")
}
b, err := io.ReadAll(response.Body)
if err != nil {
log.Fatalln(err)
}
fmt.Println(string(b))
expected := "{\"accessKey\":\"accessKey\",\"memberOf\":null,\"policy\":[],\"status\":\"enabled\"}\n"
obtained := string(b)
assert.Equal(expected, obtained, "User Information is wrong")
}
func TestUpdateUserInfoSuccessfulResponse(t *testing.T) {
/*
Update User Information Test with Successful Response
*/
assert := assert.New(t)
// 1. Create an active user
groups := []string{}
policies := []string{}
addUserResponse, addUserError := AddUser(
"updateuser", "secretKey", groups, policies)
if addUserError != nil {
log.Println(addUserError)
return
}
if addUserResponse != nil {
fmt.Println("StatusCode:", addUserResponse.StatusCode)
assert.Equal(
201, addUserResponse.StatusCode, "Status Code is incorrect")
}
// 2. Deactivate the user
// '{"status":"disabled","groups":[]}'
updateUserResponse, UpdateUserError := UpdateUserInformation(
"updateuser", "disabled", groups)
// 3. Verify user got deactivated
if UpdateUserError != nil {
log.Println(UpdateUserError)
return
}
if updateUserResponse != nil {
fmt.Println("StatusCode:", updateUserResponse.StatusCode)
assert.Equal(
200, updateUserResponse.StatusCode, "Status Code is incorrect")
}
b, err := io.ReadAll(updateUserResponse.Body)
if err != nil {
log.Fatalln(err)
}
assert.True(strings.Contains(string(b), "disabled"))
}
func TestUpdateUserInfoGenericErrorResponse(t *testing.T) {
/*
Update User Information Test with Generic Error Response
*/
assert := assert.New(t)
// 1. Create an active user
groups := []string{}
policies := []string{}
addUserResponse, addUserError := AddUser(
"updateusererror", "secretKey", groups, policies)
if addUserError != nil {
log.Println(addUserError)
return
}
if addUserResponse != nil {
fmt.Println("StatusCode:", addUserResponse.StatusCode)
assert.Equal(
201, addUserResponse.StatusCode, "Status Code is incorrect")
}
// 2. Deactivate the user with wrong status
updateUserResponse, UpdateUserError := UpdateUserInformation(
"updateusererror", "inactive", groups)
// 3. Verify user got deactivated
if UpdateUserError != nil {
log.Println(UpdateUserError)
assert.Fail("There was an error while updating user info")
return
}
if updateUserResponse != nil {
fmt.Println("StatusCode:", updateUserResponse.StatusCode)
assert.Equal(
500, updateUserResponse.StatusCode, "Status Code is incorrect")
}
b, err := io.ReadAll(updateUserResponse.Body)
if err != nil {
log.Fatalln(err)
}
assert.True(strings.Contains(string(b), "status not valid"))
}
func TestRemoveUserSuccessfulResponse(t *testing.T) {
/*
To test removing a user from API
*/
assert := assert.New(t)
// 1. Create an active user
groups := []string{}
policies := []string{}
addUserResponse, addUserError := AddUser(
"testremoveuser1", "secretKey", groups, policies)
if addUserError != nil {
log.Println(addUserError)
return
}
if addUserResponse != nil {
fmt.Println("StatusCode:", addUserResponse.StatusCode)
assert.Equal(
201, addUserResponse.StatusCode, "Status Code is incorrect")
}
// 2. Remove the user
removeUserResponse, removeUserError := RemoveUser("testremoveuser1")
if removeUserError != nil {
log.Println(removeUserError)
return
}
if removeUserResponse != nil {
fmt.Println("StatusCode:", removeUserResponse.StatusCode)
assert.Equal(
204, removeUserResponse.StatusCode, "Status Code is incorrect")
}
// 3. Verify the user got removed
getUserInfoResponse, getUserInfoError := GetUserInformation(
"testremoveuser1")
if getUserInfoError != nil {
log.Println(getUserInfoError)
assert.Fail("There was an error in the response")
return
}
if getUserInfoResponse != nil {
fmt.Println("StatusCode:", getUserInfoResponse.StatusCode)
assert.Equal(
404, getUserInfoResponse.StatusCode, "Status Code is incorrect")
}
finalResponse := inspectHTTPResponse(getUserInfoResponse)
fmt.Println(finalResponse)
assert.True(strings.Contains(
finalResponse, "The specified user does not exist"), finalResponse)
}
func TestUpdateGroupsForAUser(t *testing.T) {
/*
To test Update Groups For a User End Point.
*/
// 1. Create the user
numberOfGroups := 3
groupName := "updategroupforausergroup"
userName := "updategroupsforauser1"
assert := assert.New(t)
groups := []string{}
policies := []string{}
response, err := AddUser(userName, "secretKey", groups, policies)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("StatusCode:", response.StatusCode)
assert.Equal(201, response.StatusCode, "Status Code is incorrect")
}
// 2. Update the groups of the created user with newGroups
newGroups := make([]string, 3)
for i := 0; i < numberOfGroups; i++ {
newGroups[i] = groupName + strconv.Itoa(i)
}
response, err = UpdateGroupsForAUser(userName, newGroups)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("StatusCode:", response.StatusCode)
assert.Equal(200, response.StatusCode, "Status Code is incorrect")
}
// 3. Verify the newGroups were updated accordingly
getUserInfoResponse, getUserInfoErr := GetUserInformation(userName)
if getUserInfoErr != nil {
log.Println(getUserInfoErr)
assert.Fail("There was an error in the response")
return
}
if getUserInfoResponse != nil {
fmt.Println("StatusCode:", getUserInfoResponse.StatusCode)
assert.Equal(
200, getUserInfoResponse.StatusCode, "Status Code is incorrect")
}
finalResponse := inspectHTTPResponse(getUserInfoResponse)
for i := 0; i < numberOfGroups; i++ {
assert.True(strings.Contains(
finalResponse, groupName+strconv.Itoa(i)), finalResponse)
}
}
func TestCreateServiceAccountForUser(t *testing.T) {
/*
To test creation of service account for a user.
*/
// Test's variables
userName := "testcreateserviceaccountforuser1"
assert := assert.New(t)
policy := ""
serviceAccountLengthInBytes := 40 // As observed, update as needed
// 1. Create the user
groups := []string{}
policies := []string{}
response, err := AddUser(userName, "secretKey", groups, policies)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("StatusCode:", response.StatusCode)
assert.Equal(201, response.StatusCode, "Status Code is incorrect")
}
// 2. Create the service account for the user
createServiceAccountResponse,
createServiceAccountError := CreateServiceAccountForUser(
userName,
policy,
)
if createServiceAccountError != nil {
log.Println(createServiceAccountError)
assert.Fail("Error in createServiceAccountError")
}
if createServiceAccountResponse != nil {
fmt.Println("StatusCode:", createServiceAccountResponse.StatusCode)
assert.Equal(
201, createServiceAccountResponse.StatusCode,
inspectHTTPResponse(createServiceAccountResponse),
)
}
// 3. Verify the service account for the user
listOfAccountsResponse, listOfAccountsError := ReturnsAListOfServiceAccountsForAUser(userName)
fmt.Println(listOfAccountsResponse, listOfAccountsError)
if listOfAccountsError != nil {
log.Println(listOfAccountsError)
assert.Fail("Error in listOfAccountsError")
}
finalResponse := inspectHTTPResponse(listOfAccountsResponse)
if listOfAccountsResponse != nil {
fmt.Println("StatusCode:", listOfAccountsResponse.StatusCode)
assert.Equal(
200, listOfAccountsResponse.StatusCode,
finalResponse,
)
}
assert.Equal(len(finalResponse), serviceAccountLengthInBytes, finalResponse)
}
func TestUsersGroupsBulk(t *testing.T) {
/*
To test UsersGroupsBulk End Point
*/
// Vars
assert := assert.New(t)
numberOfUsers := 5
numberOfGroups := 1
// var groups = []string{}
policies := []string{}
username := "testusersgroupbulk"
groupName := "testusersgroupsbulkgroupone"
members := []string{}
users := make([]string, numberOfUsers)
groups := make([]string, numberOfGroups)
// 1. Create some users
for i := 0; i < numberOfUsers; i++ {
users[i] = username + strconv.Itoa(i)
response, err := AddUser(
users[i],
"secretKey"+strconv.Itoa(i), []string{}, policies)
if err != nil {
log.Println(err)
return
}
if response != nil {
fmt.Println("POST StatusCode:", response.StatusCode)
assert.Equal(201, response.StatusCode,
"Status Code is incorrect on index: "+strconv.Itoa(i))
}
}
// 2. Create a group with no members
responseAddGroup, errorAddGroup := AddGroup(groupName, members)
if errorAddGroup != nil {
log.Println(errorAddGroup)
return
}
finalResponse := inspectHTTPResponse(responseAddGroup)
if responseAddGroup != nil {
fmt.Println("POST StatusCode:", responseAddGroup.StatusCode)
assert.Equal(
201,
responseAddGroup.StatusCode,
finalResponse,
)
}
// 3. Add users to the group
groups[0] = groupName
responseUsersGroupsBulk, errorUsersGroupsBulk := UsersGroupsBulk(
users,
groups,
)
if errorUsersGroupsBulk != nil {
log.Println(errorUsersGroupsBulk)
return
}
finalResponse = inspectHTTPResponse(responseUsersGroupsBulk)
if responseUsersGroupsBulk != nil {
fmt.Println("POST StatusCode:", responseUsersGroupsBulk.StatusCode)
assert.Equal(
200,
responseUsersGroupsBulk.StatusCode,
finalResponse,
)
}
// 4. Verify users got added to the group
for i := 0; i < numberOfUsers; i++ {
responseGetUserInfo, errGetUserInfo := GetUserInformation(
username + strconv.Itoa(i),
)
if errGetUserInfo != nil {
log.Println(errGetUserInfo)
assert.Fail("There was an error in the response")
return
}
finalResponse = inspectHTTPResponse(responseGetUserInfo)
if responseGetUserInfo != nil {
assert.Equal(200, responseGetUserInfo.StatusCode, finalResponse)
}
// Make sure the user belongs to the created group
assert.True(strings.Contains(finalResponse, groupName))
}
}
func Test_GetUserPolicyAPI(t *testing.T) {
assert := assert.New(t)
// 1. Create an active user with valid policy
groups := []string{}
policies := []string{"readwrite"}
addUserResponse, addUserError := AddUser(
"getpolicyuser", "secretKey", groups, policies)
if addUserError != nil {
log.Println(addUserError)
return
}
if addUserResponse != nil {
fmt.Println("StatusCode:", addUserResponse.StatusCode)
assert.Equal(
201, addUserResponse.StatusCode, "Status Code is incorrect")
}
type args struct {
api string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Get User Policies",
args: args{
api: "/user/policy",
},
expectedStatus: 200,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, tt.name+" Failed")
}
})
}
}

View File

@@ -0,0 +1,73 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package integration
import (
"fmt"
"log"
"net/http"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func Test_VersionAPI(t *testing.T) {
assert := assert.New(t)
type args struct {
api string
}
tests := []struct {
name string
args args
expectedStatus int
expectedError error
}{
{
name: "Check Version",
args: args{
api: "/check-version",
},
expectedStatus: 200,
expectedError: nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
client := &http.Client{
Timeout: 3 * time.Second,
}
request, err := http.NewRequest(
"GET", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), nil)
if err != nil {
log.Println(err)
return
}
request.Header.Add("Content-Type", "application/json")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
if response != nil {
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
}
})
}
}

View File

@@ -1,44 +0,0 @@
#!/bin/bash
# setup environment variables based on flags to see if we should build the docker containers again
CONSOLE_DOCKER="true"
# evaluate flags
# `-m` for console
while getopts ":m:" opt; do
case $opt in
m)
CONSOLE_DOCKER="$OPTARG"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done
echo "Provisioning Kind"
kind create cluster --config kind-cluster.yaml
echo "Remove Master Taint"
kubectl taint nodes --all node-role.kubernetes.io/master-
echo "Install Contour"
kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
kubectl patch daemonsets -n projectcontour envoy -p '{"spec":{"template":{"spec":{"nodeSelector":{"ingress-ready":"true"},"tolerations":[{"key":"node-role.kubernetes.io/master","operator":"Equal","effect":"NoSchedule"}]}}}}'
echo "install metrics server"
kubectl apply -f metrics-dev.yaml
# Whether or not to build the m3 container and load it to kind or just load it
if [[ $CONSOLE_DOCKER == "true" ]]; then
# Build mkube
make --directory=".." k8sdev TAG=minio/console:latest
else
kind load docker-image minio/console:latest
fi
echo "done"

View File

@@ -1,22 +0,0 @@
# three node (two workers) cluster config
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 8844
protocol: TCP
- containerPort: 443
hostPort: 8843
protocol: TCP
#- role: worker
#- role: worker
#- role: worker
#- role: worker

View File

@@ -1,153 +0,0 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: system:aggregated-metrics-reader
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["metrics.k8s.io"]
resources: ["pods", "nodes"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: metrics-server:system:auth-delegator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: metrics-server-auth-reader
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: extension-apiserver-authentication-reader
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: system:metrics-server
rules:
- apiGroups:
- ""
resources:
- pods
- nodes
- nodes/stats
- namespaces
- configmaps
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: system:metrics-server
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:metrics-server
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: apiregistration.k8s.io/v1beta1
kind: APIService
metadata:
name: v1beta1.metrics.k8s.io
spec:
service:
name: metrics-server
namespace: kube-system
group: metrics.k8s.io
version: v1beta1
insecureSkipTLSVerify: true
groupPriorityMinimum: 100
versionPriority: 100
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: metrics-server
namespace: kube-system
---
apiVersion: v1
kind: Service
metadata:
name: metrics-server
namespace: kube-system
labels:
kubernetes.io/name: "Metrics-server"
kubernetes.io/cluster-service: "true"
spec:
selector:
k8s-app: metrics-server
ports:
- port: 443
protocol: TCP
targetPort: main-port
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: metrics-server
namespace: kube-system
labels:
k8s-app: metrics-server
spec:
selector:
matchLabels:
k8s-app: metrics-server
template:
metadata:
name: metrics-server
labels:
k8s-app: metrics-server
spec:
serviceAccountName: metrics-server
volumes:
# mount in tmp so we can safely use from-scratch images and/or read-only containers
- name: tmp-dir
emptyDir: {}
containers:
- name: metrics-server
image: k8s.gcr.io/metrics-server-amd64:v0.3.6
args:
- --cert-dir=/tmp
- --secure-port=4443
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP
ports:
- name: main-port
containerPort: 4443
protocol: TCP
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
imagePullPolicy: Always
volumeMounts:
- name: tmp-dir
mountPath: /tmp
nodeSelector:
beta.kubernetes.io/os: linux
kubernetes.io/arch: "amd64"

View File

@@ -1,12 +0,0 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: console-sa-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: console-sa-role
subjects:
- kind: ServiceAccount
name: console-sa
namespace: default

View File

@@ -1,234 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: console-sa-role
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- watch
- create
- list
- patch
- update
- deletecollection
- apiGroups:
- ""
resources:
- namespaces
- services
- events
- resourcequotas
- nodes
verbs:
- get
- watch
- create
- list
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- watch
- create
- list
- patch
- delete
- deletecollection
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- deletecollection
- list
- get
- watch
- update
- apiGroups:
- "storage.k8s.io"
resources:
- storageclasses
verbs:
- get
- watch
- create
- list
- patch
- apiGroups:
- apps
resources:
- statefulsets
- deployments
verbs:
- get
- create
- list
- patch
- watch
- update
- delete
- apiGroups:
- batch
resources:
- jobs
verbs:
- get
- create
- list
- patch
- watch
- update
- delete
- apiGroups:
- "certificates.k8s.io"
resources:
- "certificatesigningrequests"
- "certificatesigningrequests/approval"
- "certificatesigningrequests/status"
verbs:
- update
- create
- get
- apiGroups:
- minio.min.io
resources:
- "*"
verbs:
- "*"
- apiGroups:
- min.io
resources:
- "*"
verbs:
- "*"
- apiGroups:
- ""
resources:
- persistentvolumes
verbs:
- get
- list
- watch
- create
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- update
- apiGroups:
- ""
resources:
- events
verbs:
- create
- list
- watch
- update
- patch
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshots
verbs:
- get
- list
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshotcontents
verbs:
- get
- list
- apiGroups:
- storage.k8s.io
resources:
- csinodes
verbs:
- get
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- volumeattachments
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- endpoints
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- direct.csi.min.io
resources:
- volumes
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- direct.csi.min.io
resources:
- directcsidrives
- directcsivolumes
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- ""
resources:
- pod
- pods/log
verbs:
- get
- list
- watch

View File

@@ -1,7 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: console-env
data:
CONSOLE_PORT: "9090"
CONSOLE_TLS_PORT: "9443"

View File

@@ -1,29 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: console
spec:
replicas: 1
selector:
matchLabels:
app: console
template:
metadata:
labels:
app: console
spec:
serviceAccountName: console-sa
containers:
- name: console
image: minio/console:v0.13.1
imagePullPolicy: "IfNotPresent"
env:
- name: CONSOLE_OPERATOR_MODE
value: "on"
args:
- server
ports:
- containerPort: 9090
name: http
- containerPort: 9433
name: https

View File

@@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: console-sa
namespace: default

View File

@@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: console
labels:
name: console
spec:
ports:
- port: 9090
name: http
- port: 9443
name: https
selector:
app: console

View File

@@ -1,10 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# beginning of customizations
resources:
- console-service-account.yaml
- console-cluster-role.yaml
- console-cluster-role-binding.yaml
- console-configmap.yaml
- console-service.yaml
- console-deployment.yaml

View File

@@ -1,46 +0,0 @@
---
apiVersion: v1
kind: Service
metadata:
name: console
namespace: default
labels:
name: console
spec:
ports:
- port: 9090
name: http
- port: 9443
name: https
selector:
app: console-standalone
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: console
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: console-standalone
template:
metadata:
labels:
app: console-standalone
spec:
containers:
- name: console
image: minio/console:v0.13.1
imagePullPolicy: "IfNotPresent"
env:
- name: CONSOLE_MINIO_SERVER
value: "https://minio.default.svc.cluster.local"
args:
- server
ports:
- containerPort: 9090
name: http
- containerPort: 9433
name: https

View File

@@ -1,20 +0,0 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Package k8s - this package imports things required by build scripts, to force `go mod` to see them as dependencies
package k8s
// import _ "k8s.io/code-generator"

View File

@@ -1,35 +0,0 @@
#!/usr/bin/env bash
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o errexit
set -o nounset
set -o pipefail
SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}
# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
bash "${CODEGEN_PKG}"/generate-groups.sh "all" \
github.com/minio/console/pkg/generated \
github.com/minio/console/pkg/apis \
mkube:v1 \
--go-header-file "${SCRIPT_ROOT}"/k8s/boilerplate.go.txt
# To use your own boilerplate text append:
# --go-header-file "${SCRIPT_ROOT}"/hack/custom-boilerplate.go.txt

View File

@@ -0,0 +1,67 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// AUserPolicyResponse a user policy response
//
// swagger:model aUserPolicyResponse
type AUserPolicyResponse struct {
// policy
Policy string `json:"policy,omitempty"`
}
// Validate validates this a user policy response
func (m *AUserPolicyResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this a user policy response based on context it is used
func (m *AUserPolicyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AUserPolicyResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AUserPolicyResponse) UnmarshalBinary(b []byte) error {
var res AUserPolicyResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -24,9 +24,12 @@ package models
import (
"context"
"encoding/json"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// AddBucketLifecycle add bucket lifecycle
@@ -40,9 +43,6 @@ type AddBucketLifecycle struct {
// Non required, toggle to disable or enable rule
ExpiredObjectDeleteMarker bool `json:"expired_object_delete_marker,omitempty"`
// Required in case of expiry_days or transition fields are not set. it defines an expiry date for ILM
ExpiryDate string `json:"expiry_date,omitempty"`
// Required in case of expiry_date or transition fields are not set. it defines an expiry days for ILM
ExpiryDays int32 `json:"expiry_days,omitempty"`
@@ -64,15 +64,67 @@ type AddBucketLifecycle struct {
// Non required field, tags to match ILM files
Tags string `json:"tags,omitempty"`
// Required in case of transition_days or expiry fields are not set. it defines a transition date for ILM
TransitionDate string `json:"transition_date,omitempty"`
// Required in case of transition_date or expiry fields are not set. it defines a transition days for ILM
TransitionDays int32 `json:"transition_days,omitempty"`
// ILM Rule type (Expiry or transition)
// Enum: [expiry transition]
Type string `json:"type,omitempty"`
}
// Validate validates this add bucket lifecycle
func (m *AddBucketLifecycle) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateType(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var addBucketLifecycleTypeTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["expiry","transition"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
addBucketLifecycleTypeTypePropEnum = append(addBucketLifecycleTypeTypePropEnum, v)
}
}
const (
// AddBucketLifecycleTypeExpiry captures enum value "expiry"
AddBucketLifecycleTypeExpiry string = "expiry"
// AddBucketLifecycleTypeTransition captures enum value "transition"
AddBucketLifecycleTypeTransition string = "transition"
)
// prop value enum
func (m *AddBucketLifecycle) validateTypeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, addBucketLifecycleTypeTypePropEnum, true); err != nil {
return err
}
return nil
}
func (m *AddBucketLifecycle) validateType(formats strfmt.Registry) error {
if swag.IsZero(m.Type) { // not required
return nil
}
// value enum
if err := m.validateTypeEnum("type", "body", m.Type); err != nil {
return err
}
return nil
}

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by

View File

@@ -0,0 +1,168 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"encoding/json"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// AddMultiBucketLifecycle add multi bucket lifecycle
//
// swagger:model addMultiBucketLifecycle
type AddMultiBucketLifecycle struct {
// buckets
// Required: true
Buckets []string `json:"buckets"`
// Non required, toggle to disable or enable rule
ExpiredObjectDeleteMarker bool `json:"expired_object_delete_marker,omitempty"`
// Required in case of expiry_date or transition fields are not set. it defines an expiry days for ILM
ExpiryDays int32 `json:"expiry_days,omitempty"`
// Non required, can be set in case of expiration is enabled
NoncurrentversionExpirationDays int32 `json:"noncurrentversion_expiration_days,omitempty"`
// Non required, can be set in case of transition is enabled
NoncurrentversionTransitionDays int32 `json:"noncurrentversion_transition_days,omitempty"`
// Non required, can be set in case of transition is enabled
NoncurrentversionTransitionStorageClass string `json:"noncurrentversion_transition_storage_class,omitempty"`
// Non required field, it matches a prefix to perform ILM operations on it
Prefix string `json:"prefix,omitempty"`
// Required only in case of transition is set. it refers to a tier
StorageClass string `json:"storage_class,omitempty"`
// Non required field, tags to match ILM files
Tags string `json:"tags,omitempty"`
// Required in case of transition_date or expiry fields are not set. it defines a transition days for ILM
TransitionDays int32 `json:"transition_days,omitempty"`
// ILM Rule type (Expiry or transition)
// Required: true
// Enum: [expiry transition]
Type *string `json:"type"`
}
// Validate validates this add multi bucket lifecycle
func (m *AddMultiBucketLifecycle) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateBuckets(formats); err != nil {
res = append(res, err)
}
if err := m.validateType(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AddMultiBucketLifecycle) validateBuckets(formats strfmt.Registry) error {
if err := validate.Required("buckets", "body", m.Buckets); err != nil {
return err
}
return nil
}
var addMultiBucketLifecycleTypeTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["expiry","transition"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
addMultiBucketLifecycleTypeTypePropEnum = append(addMultiBucketLifecycleTypeTypePropEnum, v)
}
}
const (
// AddMultiBucketLifecycleTypeExpiry captures enum value "expiry"
AddMultiBucketLifecycleTypeExpiry string = "expiry"
// AddMultiBucketLifecycleTypeTransition captures enum value "transition"
AddMultiBucketLifecycleTypeTransition string = "transition"
)
// prop value enum
func (m *AddMultiBucketLifecycle) validateTypeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, addMultiBucketLifecycleTypeTypePropEnum, true); err != nil {
return err
}
return nil
}
func (m *AddMultiBucketLifecycle) validateType(formats strfmt.Registry) error {
if err := validate.Required("type", "body", m.Type); err != nil {
return err
}
// value enum
if err := m.validateTypeEnum("type", "body", *m.Type); err != nil {
return err
}
return nil
}
// ContextValidate validates this add multi bucket lifecycle based on context it is used
func (m *AddMultiBucketLifecycle) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AddMultiBucketLifecycle) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AddMultiBucketLifecycle) UnmarshalBinary(b []byte) error {
var res AddMultiBucketLifecycle
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by

View File

@@ -0,0 +1,88 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// AddServiceAccountPolicyRequest add service account policy request
//
// swagger:model addServiceAccountPolicyRequest
type AddServiceAccountPolicyRequest struct {
// policy
// Required: true
Policy *string `json:"policy"`
}
// Validate validates this add service account policy request
func (m *AddServiceAccountPolicyRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validatePolicy(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AddServiceAccountPolicyRequest) validatePolicy(formats strfmt.Registry) error {
if err := validate.Required("policy", "body", m.Policy); err != nil {
return err
}
return nil
}
// ContextValidate validates this add service account policy request based on context it is used
func (m *AddServiceAccountPolicyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AddServiceAccountPolicyRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AddServiceAccountPolicyRequest) UnmarshalBinary(b []byte) error {
var res AddServiceAccountPolicyRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -24,11 +24,13 @@ package models
import (
"context"
"encoding/json"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// AdminInfoResponse admin info response
@@ -36,15 +38,19 @@ import (
// swagger:model adminInfoResponse
type AdminInfoResponse struct {
// advanced metrics status
// Enum: [not configured available unavailable]
AdvancedMetricsStatus string `json:"advancedMetricsStatus,omitempty"`
// backend
Backend *BackendProperties `json:"backend,omitempty"`
// buckets
Buckets int64 `json:"buckets,omitempty"`
// objects
Objects int64 `json:"objects,omitempty"`
// prometheus not ready
PrometheusNotReady bool `json:"prometheusNotReady,omitempty"`
// servers
Servers []*ServerProperties `json:"servers"`
@@ -59,6 +65,14 @@ type AdminInfoResponse struct {
func (m *AdminInfoResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAdvancedMetricsStatus(formats); err != nil {
res = append(res, err)
}
if err := m.validateBackend(formats); err != nil {
res = append(res, err)
}
if err := m.validateServers(formats); err != nil {
res = append(res, err)
}
@@ -73,6 +87,70 @@ func (m *AdminInfoResponse) Validate(formats strfmt.Registry) error {
return nil
}
var adminInfoResponseTypeAdvancedMetricsStatusPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["not configured","available","unavailable"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
adminInfoResponseTypeAdvancedMetricsStatusPropEnum = append(adminInfoResponseTypeAdvancedMetricsStatusPropEnum, v)
}
}
const (
// AdminInfoResponseAdvancedMetricsStatusNotConfigured captures enum value "not configured"
AdminInfoResponseAdvancedMetricsStatusNotConfigured string = "not configured"
// AdminInfoResponseAdvancedMetricsStatusAvailable captures enum value "available"
AdminInfoResponseAdvancedMetricsStatusAvailable string = "available"
// AdminInfoResponseAdvancedMetricsStatusUnavailable captures enum value "unavailable"
AdminInfoResponseAdvancedMetricsStatusUnavailable string = "unavailable"
)
// prop value enum
func (m *AdminInfoResponse) validateAdvancedMetricsStatusEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, adminInfoResponseTypeAdvancedMetricsStatusPropEnum, true); err != nil {
return err
}
return nil
}
func (m *AdminInfoResponse) validateAdvancedMetricsStatus(formats strfmt.Registry) error {
if swag.IsZero(m.AdvancedMetricsStatus) { // not required
return nil
}
// value enum
if err := m.validateAdvancedMetricsStatusEnum("advancedMetricsStatus", "body", m.AdvancedMetricsStatus); err != nil {
return err
}
return nil
}
func (m *AdminInfoResponse) validateBackend(formats strfmt.Registry) error {
if swag.IsZero(m.Backend) { // not required
return nil
}
if m.Backend != nil {
if err := m.Backend.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("backend")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("backend")
}
return err
}
}
return nil
}
func (m *AdminInfoResponse) validateServers(formats strfmt.Registry) error {
if swag.IsZero(m.Servers) { // not required
return nil
@@ -87,6 +165,8 @@ func (m *AdminInfoResponse) validateServers(formats strfmt.Registry) error {
if err := m.Servers[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("servers" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("servers" + "." + strconv.Itoa(i))
}
return err
}
@@ -111,6 +191,8 @@ func (m *AdminInfoResponse) validateWidgets(formats strfmt.Registry) error {
if err := m.Widgets[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("widgets" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("widgets" + "." + strconv.Itoa(i))
}
return err
}
@@ -125,6 +207,10 @@ func (m *AdminInfoResponse) validateWidgets(formats strfmt.Registry) error {
func (m *AdminInfoResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateBackend(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateServers(ctx, formats); err != nil {
res = append(res, err)
}
@@ -139,6 +225,22 @@ func (m *AdminInfoResponse) ContextValidate(ctx context.Context, formats strfmt.
return nil
}
func (m *AdminInfoResponse) contextValidateBackend(ctx context.Context, formats strfmt.Registry) error {
if m.Backend != nil {
if err := m.Backend.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("backend")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("backend")
}
return err
}
}
return nil
}
func (m *AdminInfoResponse) contextValidateServers(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Servers); i++ {
@@ -147,6 +249,8 @@ func (m *AdminInfoResponse) contextValidateServers(ctx context.Context, formats
if err := m.Servers[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("servers" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("servers" + "." + strconv.Itoa(i))
}
return err
}
@@ -165,6 +269,8 @@ func (m *AdminInfoResponse) contextValidateWidgets(ctx context.Context, formats
if err := m.Widgets[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("widgets" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("widgets" + "." + strconv.Itoa(i))
}
return err
}

View File

@@ -1,165 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// AllocatableResourcesResponse allocatable resources response
//
// swagger:model allocatableResourcesResponse
type AllocatableResourcesResponse struct {
// cpu priority
CPUPriority *NodeMaxAllocatableResources `json:"cpu_priority,omitempty"`
// mem priority
MemPriority *NodeMaxAllocatableResources `json:"mem_priority,omitempty"`
// min allocatable cpu
MinAllocatableCPU int64 `json:"min_allocatable_cpu,omitempty"`
// min allocatable mem
MinAllocatableMem int64 `json:"min_allocatable_mem,omitempty"`
}
// Validate validates this allocatable resources response
func (m *AllocatableResourcesResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCPUPriority(formats); err != nil {
res = append(res, err)
}
if err := m.validateMemPriority(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AllocatableResourcesResponse) validateCPUPriority(formats strfmt.Registry) error {
if swag.IsZero(m.CPUPriority) { // not required
return nil
}
if m.CPUPriority != nil {
if err := m.CPUPriority.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("cpu_priority")
}
return err
}
}
return nil
}
func (m *AllocatableResourcesResponse) validateMemPriority(formats strfmt.Registry) error {
if swag.IsZero(m.MemPriority) { // not required
return nil
}
if m.MemPriority != nil {
if err := m.MemPriority.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("mem_priority")
}
return err
}
}
return nil
}
// ContextValidate validate this allocatable resources response based on the context it is used
func (m *AllocatableResourcesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCPUPriority(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMemPriority(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AllocatableResourcesResponse) contextValidateCPUPriority(ctx context.Context, formats strfmt.Registry) error {
if m.CPUPriority != nil {
if err := m.CPUPriority.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("cpu_priority")
}
return err
}
}
return nil
}
func (m *AllocatableResourcesResponse) contextValidateMemPriority(ctx context.Context, formats strfmt.Registry) error {
if m.MemPriority != nil {
if err := m.MemPriority.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("mem_priority")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *AllocatableResourcesResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AllocatableResourcesResponse) UnmarshalBinary(b []byte) error {
var res AllocatableResourcesResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

67
models/api_key.go Normal file
View File

@@ -0,0 +1,67 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// APIKey api key
//
// swagger:model apiKey
type APIKey struct {
// api key
APIKey string `json:"apiKey,omitempty"`
}
// Validate validates this api key
func (m *APIKey) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this api key based on context it is used
func (m *APIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *APIKey) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *APIKey) UnmarshalBinary(b []byte) error {
var res APIKey
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by

View File

@@ -1,321 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// AwsConfiguration aws configuration
//
// swagger:model awsConfiguration
type AwsConfiguration struct {
// secretsmanager
// Required: true
Secretsmanager *AwsConfigurationSecretsmanager `json:"secretsmanager"`
}
// Validate validates this aws configuration
func (m *AwsConfiguration) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSecretsmanager(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AwsConfiguration) validateSecretsmanager(formats strfmt.Registry) error {
if err := validate.Required("secretsmanager", "body", m.Secretsmanager); err != nil {
return err
}
if m.Secretsmanager != nil {
if err := m.Secretsmanager.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("secretsmanager")
}
return err
}
}
return nil
}
// ContextValidate validate this aws configuration based on the context it is used
func (m *AwsConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateSecretsmanager(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AwsConfiguration) contextValidateSecretsmanager(ctx context.Context, formats strfmt.Registry) error {
if m.Secretsmanager != nil {
if err := m.Secretsmanager.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("secretsmanager")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *AwsConfiguration) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AwsConfiguration) UnmarshalBinary(b []byte) error {
var res AwsConfiguration
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// AwsConfigurationSecretsmanager aws configuration secretsmanager
//
// swagger:model AwsConfigurationSecretsmanager
type AwsConfigurationSecretsmanager struct {
// credentials
// Required: true
Credentials *AwsConfigurationSecretsmanagerCredentials `json:"credentials"`
// endpoint
// Required: true
Endpoint *string `json:"endpoint"`
// kmskey
Kmskey string `json:"kmskey,omitempty"`
// region
// Required: true
Region *string `json:"region"`
}
// Validate validates this aws configuration secretsmanager
func (m *AwsConfigurationSecretsmanager) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCredentials(formats); err != nil {
res = append(res, err)
}
if err := m.validateEndpoint(formats); err != nil {
res = append(res, err)
}
if err := m.validateRegion(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AwsConfigurationSecretsmanager) validateCredentials(formats strfmt.Registry) error {
if err := validate.Required("secretsmanager"+"."+"credentials", "body", m.Credentials); err != nil {
return err
}
if m.Credentials != nil {
if err := m.Credentials.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("secretsmanager" + "." + "credentials")
}
return err
}
}
return nil
}
func (m *AwsConfigurationSecretsmanager) validateEndpoint(formats strfmt.Registry) error {
if err := validate.Required("secretsmanager"+"."+"endpoint", "body", m.Endpoint); err != nil {
return err
}
return nil
}
func (m *AwsConfigurationSecretsmanager) validateRegion(formats strfmt.Registry) error {
if err := validate.Required("secretsmanager"+"."+"region", "body", m.Region); err != nil {
return err
}
return nil
}
// ContextValidate validate this aws configuration secretsmanager based on the context it is used
func (m *AwsConfigurationSecretsmanager) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCredentials(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AwsConfigurationSecretsmanager) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error {
if m.Credentials != nil {
if err := m.Credentials.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("secretsmanager" + "." + "credentials")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *AwsConfigurationSecretsmanager) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AwsConfigurationSecretsmanager) UnmarshalBinary(b []byte) error {
var res AwsConfigurationSecretsmanager
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// AwsConfigurationSecretsmanagerCredentials aws configuration secretsmanager credentials
//
// swagger:model AwsConfigurationSecretsmanagerCredentials
type AwsConfigurationSecretsmanagerCredentials struct {
// accesskey
// Required: true
Accesskey *string `json:"accesskey"`
// secretkey
// Required: true
Secretkey *string `json:"secretkey"`
// token
Token string `json:"token,omitempty"`
}
// Validate validates this aws configuration secretsmanager credentials
func (m *AwsConfigurationSecretsmanagerCredentials) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAccesskey(formats); err != nil {
res = append(res, err)
}
if err := m.validateSecretkey(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AwsConfigurationSecretsmanagerCredentials) validateAccesskey(formats strfmt.Registry) error {
if err := validate.Required("secretsmanager"+"."+"credentials"+"."+"accesskey", "body", m.Accesskey); err != nil {
return err
}
return nil
}
func (m *AwsConfigurationSecretsmanagerCredentials) validateSecretkey(formats strfmt.Registry) error {
if err := validate.Required("secretsmanager"+"."+"credentials"+"."+"secretkey", "body", m.Secretkey); err != nil {
return err
}
return nil
}
// ContextValidate validates this aws configuration secretsmanager credentials based on context it is used
func (m *AwsConfigurationSecretsmanagerCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AwsConfigurationSecretsmanagerCredentials) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AwsConfigurationSecretsmanagerCredentials) UnmarshalBinary(b []byte) error {
var res AwsConfigurationSecretsmanagerCredentials
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,313 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// AzureConfiguration azure configuration
//
// swagger:model azureConfiguration
type AzureConfiguration struct {
// keyvault
// Required: true
Keyvault *AzureConfigurationKeyvault `json:"keyvault"`
}
// Validate validates this azure configuration
func (m *AzureConfiguration) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateKeyvault(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AzureConfiguration) validateKeyvault(formats strfmt.Registry) error {
if err := validate.Required("keyvault", "body", m.Keyvault); err != nil {
return err
}
if m.Keyvault != nil {
if err := m.Keyvault.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keyvault")
}
return err
}
}
return nil
}
// ContextValidate validate this azure configuration based on the context it is used
func (m *AzureConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateKeyvault(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AzureConfiguration) contextValidateKeyvault(ctx context.Context, formats strfmt.Registry) error {
if m.Keyvault != nil {
if err := m.Keyvault.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keyvault")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *AzureConfiguration) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AzureConfiguration) UnmarshalBinary(b []byte) error {
var res AzureConfiguration
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// AzureConfigurationKeyvault azure configuration keyvault
//
// swagger:model AzureConfigurationKeyvault
type AzureConfigurationKeyvault struct {
// credentials
Credentials *AzureConfigurationKeyvaultCredentials `json:"credentials,omitempty"`
// endpoint
// Required: true
Endpoint *string `json:"endpoint"`
}
// Validate validates this azure configuration keyvault
func (m *AzureConfigurationKeyvault) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCredentials(formats); err != nil {
res = append(res, err)
}
if err := m.validateEndpoint(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AzureConfigurationKeyvault) validateCredentials(formats strfmt.Registry) error {
if swag.IsZero(m.Credentials) { // not required
return nil
}
if m.Credentials != nil {
if err := m.Credentials.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keyvault" + "." + "credentials")
}
return err
}
}
return nil
}
func (m *AzureConfigurationKeyvault) validateEndpoint(formats strfmt.Registry) error {
if err := validate.Required("keyvault"+"."+"endpoint", "body", m.Endpoint); err != nil {
return err
}
return nil
}
// ContextValidate validate this azure configuration keyvault based on the context it is used
func (m *AzureConfigurationKeyvault) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCredentials(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AzureConfigurationKeyvault) contextValidateCredentials(ctx context.Context, formats strfmt.Registry) error {
if m.Credentials != nil {
if err := m.Credentials.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keyvault" + "." + "credentials")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *AzureConfigurationKeyvault) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AzureConfigurationKeyvault) UnmarshalBinary(b []byte) error {
var res AzureConfigurationKeyvault
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// AzureConfigurationKeyvaultCredentials azure configuration keyvault credentials
//
// swagger:model AzureConfigurationKeyvaultCredentials
type AzureConfigurationKeyvaultCredentials struct {
// client id
// Required: true
ClientID *string `json:"client_id"`
// client secret
// Required: true
ClientSecret *string `json:"client_secret"`
// tenant id
// Required: true
TenantID *string `json:"tenant_id"`
}
// Validate validates this azure configuration keyvault credentials
func (m *AzureConfigurationKeyvaultCredentials) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateClientID(formats); err != nil {
res = append(res, err)
}
if err := m.validateClientSecret(formats); err != nil {
res = append(res, err)
}
if err := m.validateTenantID(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AzureConfigurationKeyvaultCredentials) validateClientID(formats strfmt.Registry) error {
if err := validate.Required("keyvault"+"."+"credentials"+"."+"client_id", "body", m.ClientID); err != nil {
return err
}
return nil
}
func (m *AzureConfigurationKeyvaultCredentials) validateClientSecret(formats strfmt.Registry) error {
if err := validate.Required("keyvault"+"."+"credentials"+"."+"client_secret", "body", m.ClientSecret); err != nil {
return err
}
return nil
}
func (m *AzureConfigurationKeyvaultCredentials) validateTenantID(formats strfmt.Registry) error {
if err := validate.Required("keyvault"+"."+"credentials"+"."+"tenant_id", "body", m.TenantID); err != nil {
return err
}
return nil
}
// ContextValidate validates this azure configuration keyvault credentials based on context it is used
func (m *AzureConfigurationKeyvaultCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AzureConfigurationKeyvaultCredentials) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AzureConfigurationKeyvaultCredentials) UnmarshalBinary(b []byte) error {
var res AzureConfigurationKeyvaultCredentials
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,79 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// BackendProperties backend properties
//
// swagger:model BackendProperties
type BackendProperties struct {
// backend type
BackendType string `json:"backendType,omitempty"`
// offline drives
OfflineDrives int64 `json:"offlineDrives,omitempty"`
// online drives
OnlineDrives int64 `json:"onlineDrives,omitempty"`
// rr s c parity
RrSCParity int64 `json:"rrSCParity,omitempty"`
// standard s c parity
StandardSCParity int64 `json:"standardSCParity,omitempty"`
}
// Validate validates this backend properties
func (m *BackendProperties) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this backend properties based on context it is used
func (m *BackendProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BackendProperties) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *BackendProperties) UnmarshalBinary(b []byte) error {
var res BackendProperties
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -43,6 +43,9 @@ type Bucket struct {
// creation date
CreationDate string `json:"creation_date,omitempty"`
// definition
Definition string `json:"definition,omitempty"`
// details
Details *BucketDetails `json:"details,omitempty"`
@@ -96,6 +99,8 @@ func (m *Bucket) validateAccess(formats strfmt.Registry) error {
if err := m.Access.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("access")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("access")
}
return err
}
@@ -113,6 +118,8 @@ func (m *Bucket) validateDetails(formats strfmt.Registry) error {
if err := m.Details.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("details")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("details")
}
return err
}
@@ -143,6 +150,8 @@ func (m *Bucket) validateRwAccess(formats strfmt.Registry) error {
if err := m.RwAccess.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rw_access")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("rw_access")
}
return err
}
@@ -179,6 +188,8 @@ func (m *Bucket) contextValidateAccess(ctx context.Context, formats strfmt.Regis
if err := m.Access.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("access")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("access")
}
return err
}
@@ -193,6 +204,8 @@ func (m *Bucket) contextValidateDetails(ctx context.Context, formats strfmt.Regi
if err := m.Details.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("details")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("details")
}
return err
}
@@ -207,6 +220,8 @@ func (m *Bucket) contextValidateRwAccess(ctx context.Context, formats strfmt.Reg
if err := m.RwAccess.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rw_access")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("rw_access")
}
return err
}
@@ -280,6 +295,8 @@ func (m *BucketDetails) validateQuota(formats strfmt.Registry) error {
if err := m.Quota.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("details" + "." + "quota")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("details" + "." + "quota")
}
return err
}
@@ -308,6 +325,8 @@ func (m *BucketDetails) contextValidateQuota(ctx context.Context, formats strfmt
if err := m.Quota.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("details" + "." + "quota")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("details" + "." + "quota")
}
return err
}
@@ -343,7 +362,7 @@ type BucketDetailsQuota struct {
Quota int64 `json:"quota,omitempty"`
// type
// Enum: [fifo hard]
// Enum: [hard]
Type string `json:"type,omitempty"`
}
@@ -365,7 +384,7 @@ var bucketDetailsQuotaTypeTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["fifo","hard"]`), &res); err != nil {
if err := json.Unmarshal([]byte(`["hard"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
@@ -375,9 +394,6 @@ func init() {
const (
// BucketDetailsQuotaTypeFifo captures enum value "fifo"
BucketDetailsQuotaTypeFifo string = "fifo"
// BucketDetailsQuotaTypeHard captures enum value "hard"
BucketDetailsQuotaTypeHard string = "hard"
)

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -37,8 +37,12 @@ import (
type BucketAccess string
func NewBucketAccess(value BucketAccess) *BucketAccess {
v := value
return &v
return &value
}
// Pointer returns a pointer to a freshly-allocated BucketAccess.
func (m BucketAccess) Pointer() *BucketAccess {
return &m
}
const (

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -65,6 +65,8 @@ func (m *BucketEncryptionRequest) validateEncType(formats strfmt.Registry) error
if err := m.EncType.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("encType")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("encType")
}
return err
}
@@ -93,6 +95,8 @@ func (m *BucketEncryptionRequest) contextValidateEncType(ctx context.Context, fo
if err := m.EncType.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("encType")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("encType")
}
return err
}

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -37,8 +37,12 @@ import (
type BucketEncryptionType string
func NewBucketEncryptionType(value BucketEncryptionType) *BucketEncryptionType {
v := value
return &v
return &value
}
// Pointer returns a pointer to a freshly-allocated BucketEncryptionType.
func (m BucketEncryptionType) Pointer() *BucketEncryptionType {
return &m
}
const (

View File

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 MinIO, Inc.
// Copyright (c) 2023 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
@@ -68,6 +68,8 @@ func (m *BucketEventRequest) validateConfiguration(formats strfmt.Registry) erro
if err := m.Configuration.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("configuration")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("configuration")
}
return err
}
@@ -96,6 +98,8 @@ func (m *BucketEventRequest) contextValidateConfiguration(ctx context.Context, f
if err := m.Configuration.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("configuration")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("configuration")
}
return err
}

Some files were not shown because too many files have changed in this diff Show More