Compare commits

...

804 Commits

Author SHA1 Message Date
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
Harshavardhana
19caa72495 update to release v0.13.1 2021-12-26 22:16:01 -08:00
Harshavardhana
6cc649da83 update minio-go to v7.0.20 to fix STS error responses 2021-12-26 22:15:12 -08:00
Harshavardhana
dccf5c0ea5 Release v0.13.0 (#1343) 2021-12-26 20:46:36 -08:00
Harshavardhana
c21a663e32 update madmin-go and minio-go dependency (#1341) 2021-12-23 11:51:02 -08:00
Daniel Valdivia
b40ec520ae Autofocus support in InputBoxWrapper (#1340)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-23 11:10:10 -06:00
Daniel Valdivia
e51bde0fd2 Add tooltips to list objects actions (#1339)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-23 11:05:07 -06:00
Harshavardhana
7123c054a4 update pkg to v1.1.10 2021-12-22 13:52:17 -08:00
Harshavardhana
2698c343e5 update madmin-go to v1.1.19 2021-12-22 13:35:27 -08:00
Prakash Senthil Vel
00a5fba8a2 UX Icons for Modals (#1337) 2021-12-21 21:56:54 -07:00
Daniel Valdivia
78fa499c12 Release v0.12.9 (#1335)
* Release v0.12.9

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

* YAMLs

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-17 17:20:29 -08:00
Daniel Valdivia
e03d483d33 Login Improvements (#1334)
* Login Improvements

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

* Paddings everywhere

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-17 16:30:02 -08:00
Alex
2cc41d56a0 Added font-weight 100 option to Lato fonts (#1333)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-17 15:46:56 -08:00
Alex
99715ff076 Change of render functions for default dashboard (#1330)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-17 17:01:37 -06:00
Prakash Senthil Vel
9c3e8f5bf7 Login UX update (#1328) 2021-12-17 15:21:26 -06:00
Alex
21158e6c7a Added CPU size selector & add tenant cleanup (#1326) 2021-12-17 10:29:10 -08:00
Lenin Alevski
725d6f9691 Handle empty permissions arrays when console runs in operator mode (#1324)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-12-15 10:11:43 -08:00
Alex
dd488e4f7a Created a new API exclusive for metadata information (#1321)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-15 10:50:34 -06:00
Lenin Alevski
3b2c740fe0 Application routing now uses SecureComponent and hasPermission function (#1288)
- Some menu options were not showing even if the user has access to
  perform the operations (IAM Policies)
- Deleted unecessary backend endpoints.go logic, instead using
  SecureComponent to validate application routes and Menu options
  rendering
- All the logic related to routes and permissions is now in the
  permissions.ts file
- Added SecureComponent to List Users page
- Separated Menu options and routing logic for AdminConsole and
  OperatorConsole
- Tools are hidden if user don't have access to them or MinIO is running
  in fs mode (heal, audit log, etc
- Hide change-password button if user don't have access
- Hide create user button if user don't have access
- fixed some bugs when ldap/oidc is enabled

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-12-13 22:37:22 -08:00
Harshavardhana
db5ae3e09f remove random logs from console (#1317)
as a practice always use LogError or LogInfo
instead of using `log.Println()` directly.
2021-12-13 00:17:33 -08:00
Prakash Senthil Vel
8a79409ef6 UX bucket and object modals and all other modals (#1307) 2021-12-10 12:12:46 -08:00
Alex
9444dadc16 Created DistributedOnly component & implemented for Heal & Speedtest pages (#1313)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-10 10:47:54 -08:00
Alex
5618e08bbe Updated ansi-html dependency to fix CVE vulnerability (#1311)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-08 23:22:07 -08:00
Harshavardhana
f4001c0add Release v0.12.8
Signed-off-by: Harshavardhana <harsha@minio.io>
2021-12-08 20:50:50 -08:00
Harshavardhana
02c4910044 update dependencies to allow building 2021-12-08 20:44:00 -08:00
Alex
1713e58e62 Release v0.12.7 (#1310)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-08 19:29:44 -08:00
Daniel Valdivia
90b33bb88f Don't load Menu icons lazily (#1309)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-08 16:09:45 -08:00
Daniel Valdivia
48dfe74aed Fix Console Warnings on Browser (#1306)
* Fixed issues with broken styles

* Fix Merge Conflicts

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

* some tweaks

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-08 18:09:29 -06:00
Daniel Valdivia
9b39566f7c Remove Unused CSS Classes (#1308)
* Remove Unused CSS Classes

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

* Remove Warnings

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-08 15:34:22 -08:00
Daniel Valdivia
aba7a9e1c9 Support to stream video (#1304)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-07 21:36:50 -06:00
adfost
3db22a2479 Rewind mode list directory bug fix (#1297)
* rewind bug fix

* adding constant
2021-12-07 18:01:44 -08:00
Daniel Valdivia
884321cfce Fix Capitalization on Tools Screen (#1305)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-07 17:41:18 -06:00
Daniel Valdivia
20c07a22e3 Remove Rewind Print (#1303)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-07 15:51:01 -06:00
Alex
bf126d3a84 Added fallback to default dashboard in case Prometheus is not accesible (#1302) 2021-12-07 13:39:50 -08:00
Daniel Valdivia
1e59f131e8 Fix 1299: Tools menu not showing for Heal Only Policy (#1301)
* Fix 1299: Tools menu not showing for Heal Only Policy

* Fix caching issue

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-07 15:38:36 -06:00
Prakash Senthil Vel
dfcd49bb5d UX make all delete modals consistent (#1289) 2021-12-07 14:58:38 -06:00
adfost
a7ab26c81e Disallow folders to share the same name as existing files. (#1279) 2021-12-07 14:33:30 -06:00
Alex
35855daa12 Added reset configuration option to settings pages (#1292)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-07 10:41:52 -08:00
Lenin Alevski
3ce0b3d633 Fixed share/download object regression (#1296)
* Fixed share/download object regression
* Adding tests for computeObjectURLWithoutEncode function

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-12-06 15:49:13 -06:00
Alex
569d2390b9 Added option to download selected items in object browser (#1286)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-03 13:10:32 -06:00
Daniel Valdivia
a39e468b96 Release v0.12.6 (#1285)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-02 13:56:50 -08:00
Alex
bbc47e6e11 Added select all to tableWrapper (#1283)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-02 13:05:50 -08:00
Alex
4fb8c2f684 Disabled speedtest in standalone mode (#1278)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-12-01 16:47:29 -08:00
Daniel Valdivia
65dcdc674a Update ViewBox for UploadFolderIcon (#1277)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-01 13:14:08 -08:00
Daniel Valdivia
ebc2b208d2 Icons (#1275)
* Updated Icons

* Tweaks after rebase

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

* Fix Object Manager Icons

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-12-01 12:07:19 -08:00
Lenin Alevski
b29fc0993b fix: access audit for bucket (#1270)
Policy listing in the Audit list tab was not displaying all the policies
with access to the current bucket

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-11-30 21:47:54 -08:00
Alex
a3d0cb37a3 Implemented Upload folder functionality (#1272)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-30 21:47:21 -08:00
Harshavardhana
85d549cc51 support all possible conditional values in policies (#1271)
Currently console only support "aws:username" as the
most basic variable for policy evaluation. This PR
extends this to add all the possible combinations
possible.

This includes all `jwt:*` and `ldap:*`
2021-11-30 23:14:55 -06:00
Daniel Valdivia
5f46ec2541 Update Readme screenshots (#1269)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-30 13:52:11 -06:00
Prakash Senthil Vel
9db0c358a4 UX Create New Tenant (#1266) 2021-11-30 13:21:55 -06:00
Harshavardhana
eefc6a7894 reload console certs upon SIGHUP (#1268) 2021-11-30 13:00:46 -06:00
Alex
c529a6d127 Added Object Manager feature for Uploads & downloads (#1265)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-30 12:06:01 -06:00
Prakash Senthil Vel
347c6aba3b Ux Tools screens (#1261)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-27 23:22:06 -08:00
Prakash Senthil Vel
400892565d UX Tiers screen (#1258) 2021-11-27 23:13:47 -08:00
Prakash Senthil Vel
b9873fa471 UX Notification endpoints (#1257)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-25 23:27:24 -06:00
Prakash Senthil Vel
62fe583a21 UX updates to Policy list Bucket and Object List (#1253)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-25 14:10:23 -08:00
Kaan Kabalak
a69f597f43 Fix z-index of MainError component (#1256)
Fixes #1255
2021-11-24 22:18:00 -06:00
adfost
cdb4392633 Adding Download Directory to Console (#1235)
* Adding Download Directory Functionality

* fixing spaces

* removing unnecessary function

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-24 20:08:25 -08:00
Prakash Senthil Vel
41f77f128e Lazy load components (#1250)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-24 19:45:09 -08:00
Alex
af68a0c7e4 Release v0.12.5 (#1252)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-23 23:40:02 -08:00
Lenin Alevski
0ea2193878 Adding SecureComponent to policy details page (#1251)
- Make Users & Policies clickeable only if user has permissions to view
  in bucket page
- Add SecureComponent to policy detail page: api calls, menu options,
  raw policy editor, etc.
- Add missing click action to groups in policy detail page
- Fix NPE in list groups for policy endpoint
- Added SecureComponent to ListPolicies page

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-11-23 20:09:36 -08:00
Prakash Senthil Vel
06b08593b7 Login page UX (#1248) 2021-11-23 13:08:24 -06:00
adfost
6b3ff10027 Securizing bucket tags (#1249) 2021-11-23 11:52:14 -06:00
Daniel Valdivia
53d278a91e Define base for assets and support for sub path (#1247)
* Added correct mime type to files

* Define Base for Assets

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

* lint

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

* Make things relative

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

* hop styling

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

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-22 21:02:16 -08:00
Daniel Valdivia
820fa61b43 Release v0.12.4 (#1246)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-19 17:46:21 -08:00
Lenin Alevski
3f60df9071 Validate provided external certificates during tenant creation (#1245)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-19 16:37:34 -08:00
Daniel Valdivia
0bbd4f0282 Lazy Load Login Screens and Menu Icons (#1244)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-19 16:12:31 -08:00
Lenin Alevski
1fa4d19e93 Adding secureComponent to groups and buckets description message (#1243)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-19 15:55:48 -08:00
Prakash Senthil Vel
f56b4905c9 Settings page ux refactor (#1242)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-19 15:27:18 -08:00
Daniel Valdivia
575bf2927d Lazy Load All Protected Routes (#1240)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-19 10:30:34 -08:00
Alex
6bacd0a45c Added autotune support to speedtest (#1239)
- Also updated tooltip trigger icon size

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

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-19 00:08:33 -08:00
Lenin Alevski
7f5de2d70e Adding SecureComponent to list groups and group details page (#1238)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-18 19:51:40 -08:00
Daniel Valdivia
f0d5398748 Deprecate SvgIcon and make all icons more consistent (#1237)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-18 19:00:37 -06:00
Prakash Senthil Vel
813458c4c1 UX cosmetics for users, groups, service accounts (#1236)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-11-18 15:13:07 -06:00
Lenin Alevski
aae493ac82 Re-implement policy handling in react (#1234)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-11-18 08:25:01 -08:00
Lenin Alevski
f5234d2830 Simplify admin actions calculations on list buckets (#1233)
* Simplify admin actions calculations on list buckets

* adding license to file
2021-11-15 19:48:25 -06:00
Lenin Alevski
f6acb888d2 Fixed regression on share file endpoint (#1232)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-11-15 14:13:39 -08:00
Alex
5328f53943 UI Adjustments in share file modal (#1231)
UI Adjustments in share file modal (elements alignment & snackbars position fixes)

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-15 15:03:07 -06:00
Prakash Senthil Vel
70a4d76283 Service account ux (#1229)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-15 12:52:55 -08:00
Harshavardhana
373bfbfe3f feat: Support dynamic redirect_uris based on incoming requests (#1227)
To enable this feature you need `CONSOLE_IDP_CALLBACK_DYNAMIC=on`

```
export CONSOLE_IDP_URL=https://gitlab.com/.well-known/openid-configuration
export CONSOLE_IDP_CLIENT_ID="b0088c3836bb029393942f71ed7c8ac0add7f0856e6c86e67b0ff98f85c48658"
export CONSOLE_IDP_SECRET="ed72087b37624e89816ac27c1355420902045274edd7baad2ae29b1b0e8436fe"
export CONSOLE_IDP_SCOPES="openid,profile,email"
export CONSOLE_IDP_USERINFO="on"
export CONSOLE_IDP_CALLBACK_DYNAMIC=on
console srv
```

if this becomes a common practice, we should enable this as default in future.
2021-11-15 12:45:09 -08:00
Daniel Valdivia
b8417fb7a0 fix: policy handling with dynamic policy variables (#1226)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-15 12:24:37 -08:00
Daniel Valdivia
70845c0ec5 Release v0.12.3 (#1224)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-12 18:17:13 -08:00
Daniel Valdivia
21a9073c5e Add HelpBox to DirectCSI. (#1225)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-12 16:38:45 -08:00
Daniel Valdivia
ad240d2ec5 New Bucket Listing Style (#1223)
* New Bucket Listing Style

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

* Select Multiple Icon

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-12 15:02:54 -08:00
Daniel Valdivia
2b34fbae47 Add Bucket as a page (#1220)
* Add Bucket as a page

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

* goimports

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

* Redirect to bucket browse

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

* Address comment

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

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-11-12 12:44:23 -08:00
Prakash Senthil Vel
258a9400d9 New Vertical Tab UX refactor (#1210)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-12 14:26:29 -06:00
Alex
33f13c4853 Changed react-scripts to be only dev dependency (#1222) 2021-11-12 02:12:54 -06:00
adfost
000071e414 Add Tagging for Buckets to Console (#1193) 2021-11-11 18:36:18 -08:00
Alex
3638455abb Increased wide modal size & removed preview file width limit (#1221)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-11 16:59:10 -08:00
Alex
8102ab7e35 Added speedtest page & updated diagnostic page (#1099)
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>
2021-11-11 16:04:18 -08:00
Lenin Alevski
34dc51a579 Fixed broken oauth2 login for operator (#1217)
This PR includes many fixes and refactors for oauth2 authentication and
login endpoints, ie:

- Invalid login returns `403` instead of `500` error
- Removed the session token from console/operator `user credentials
  login`, `oauth flow login` and `change-password` api responses
- Removed session token from localStorage
- Added styles for oauth_callback page and display more descriptive
  errors for debugging
- Success logins returns `204` instead of `200`
- Removed unused swagger apis and code from both, operator and console
  projects
- Operator `Oauth2` login flow was not validating anything, now it does

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-11-11 14:46:14 -08:00
jinapurapu
0086aa8f64 Added ref to documentation links on Basic dashboard help card (#1219)
* Created help Box guiding user to Prometheus documentation

* Created PrometheusIcon for help card

* Added ref to documentation links

* Changed order of url parameters

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-11 12:30:16 -08:00
Daniel Valdivia
abd9768bd9 Recover Icon. Add Tooltip support for TableActionButton (#1215)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-10 22:38:18 -08:00
jinapurapu
0e778a7466 Created Help Box on Basic Dashboard guiding user to Prometheus documentation (#1214)
* Created help Box guiding user to Prometheus documentation

* Created PrometheusIcon for help card

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-10 16:56:29 -08:00
Daniel Valdivia
fae0135f69 Fix Manage Tenant is disabled always in Tenant Summary (#1211)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-11-10 16:00:59 -08:00
Daniel Valdivia
3b69d9809e Match Checkbox Design (#1216)
* Match Checkbox Design

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

* unselected shadow box

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-10 15:25:05 -08:00
Harshavardhana
09a5dfebbc use container services in integration tests (#1213) 2021-11-10 12:10:29 -08:00
Lenin Alevski
9a01922c67 fix session duration regression (#1212)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-11-10 10:26:27 -08:00
Alex
6df6d785d7 Changed link button component for MinIO Image (#1208)
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>
2021-11-10 09:54:22 -08:00
Lenin Alevski
e82103c678 Remove yarn warnings from portal-ui (#1207)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-11-10 09:47:47 -08:00
Lenin Alevski
c2f0889ff8 STS session token and console session cookie have same duration (#1202)
- `CONSOLE_STS_DURATION_IN_SECONDS` env renamed to `CONSOLE_STS_DURATION` to support more time formats

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-11-09 21:41:00 -08:00
adfost
4a8ec219cc don't restart after every commit (#1204)
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-11-09 11:32:23 -08:00
Daniel Valdivia
e461a2268a Remove Warnings (#1200)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-08 22:43:00 -08:00
Daniel Valdivia
31fbdd515c Release v0.12.2 (#1201)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-08 18:44:57 -08:00
Daniel Valdivia
685cfda752 Update Box Button Style and move Icons to the Right (#1199)
* Update Box Button Style and move Icons to the Right

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

* Add AButton component to replace <a> tags

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-08 16:09:59 -08:00
Daniel Valdivia
5c40bda742 Disable Manage button if (#1198)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-08 16:02:40 -08:00
Daniel Valdivia
47a48de7a1 Release v0.12.1 (#1192)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-04 16:12:43 -07:00
Daniel Valdivia
b8027c7bf5 Make Dashboard reactive in xs and sm to full screen (#1189)
* Make Dashboard reactive in xs and sm to full screen

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

* Dynamic Widgets

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-04 16:03:33 -07:00
Daniel Valdivia
9b06748cef Match button's height. Remove Margin+Padding on Panel Titles. Move List bucket Buttons. (#1191)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-04 15:29:31 -07:00
Alex
6e3c0bdc49 Fixed possible undefined condition if element is not defined. (#1190)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-04 13:54:29 -07:00
Daniel Valdivia
a9937afc64 Redirect back to original URL if user redirected to loging screen (#1187)
* Redirect back to original URL if user redirected to loging screen

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

* Cover SSO cases

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

Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-11-04 13:31:55 -07:00
Daniel Valdivia
1bb7012d53 License Tweaks (#1188)
* License Tweaks

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

* Address comments

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

* Fix react tests

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

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-11-04 13:07:34 -07:00
Alex
c0601b7dfd Disabled restore button on delete marker = true (#1186)
* Disabled restore button on delete marker = true

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-04 12:49:34 -07:00
jinapurapu
f7eac3086b Fixed health color logic for two drive case (#1185)
* Fixed health color logic for two drive case

* Removed unneeded code
2021-11-03 16:49:46 -07:00
Daniel Valdivia
5df4e98037 Release v0.12.0 (#1184)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-03 14:30:37 -07:00
Prakash Senthil Vel
4e7559f354 Groups page ux refactor (#1183) 2021-11-03 10:12:31 -07:00
Alex
acd785dfe0 Added support to restore versions in object details (#1181)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-02 17:59:52 -07:00
Lenin Alevski
184f864873 Dynamic UI components (#1162)
Hide/Show UI components based on the IAM policy of the current user

- Buckets lists: hide/show manage button
- Bucket admin page: left menu items enable/disable
- Bucket admin page: bucket configuration buttons are enabled/disabled
- Bucket admin page: hide/show create buttons
- Bucket admin page: enable/disable requests to backend service
- Object browser: hide/show bucket buttons for upload, delete, etc
- Object browser: hide/show bucket configuration button
- Object details: hide/show object buttons, ie: delete
- Object details: hide/show object attributes, ie: legal hold,
  retention, tags, etc

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

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-02 17:34:39 -07:00
adfost
e1a3164cd9 Fix reload bar not disappearing on console settings page. (#1178)
* bug_fix_reload

* removing duplicate line

Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-02 16:51:16 -07:00
Daniel Valdivia
dc35bb2191 Tools Page (#1180)
* Tools Page

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

* Help Boxes

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

* Remove Un-Used code

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-02 16:41:52 -07:00
Daniel Valdivia
f4c90bbe7e Right Alighn Scalar/Unit selector (#1169)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-01 21:25:15 -07:00
Daniel Valdivia
2d51f64b5f Update buttons to BoxIconButton (#1174)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-01 20:59:03 -07:00
Alex
684f089f61 Added loading validation to avoid flashing empty components (#1177)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-11-01 20:46:45 -07:00
Daniel Valdivia
e7f1aeff94 Align right radio groups (#1167)
* Match Design for Switches

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

* Margins

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

* Align Right Radio Buttons

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

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-11-01 18:46:43 -07:00
Daniel Valdivia
2f917134e6 Optimized List objects v2 for metadata (#1175)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-01 18:34:20 -07:00
Daniel Valdivia
dfd0d084d9 Fix styles activated license page (#1176)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-11-01 17:39:50 -07:00
Daniel Valdivia
ad2cdd73be Updated Liencese Page (#1170) 2021-10-29 18:57:50 -07:00
Daniel Valdivia
2191a1561a Match switch design (#1166)
* Match Design for Switches

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

* Margins

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-29 14:17:15 -07:00
Daniel Valdivia
c9352f1a6a Add Info Cards on Empty Screens (#1164)
* Add Info Cards on Empty Screens

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

* Fix ICon

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-29 12:31:36 -07:00
Daniel Valdivia
7a5cc660d4 New tenants list (#1160)
* New Tenants Listing

* Removed all warnings and duplciate comments
2021-10-28 10:29:38 -07:00
Alex
610c8a4653 Made versions text selectable (#1159)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-27 18:50:28 -07:00
Alex
5740c11fca Fixed some details on audit logs page (#1156)
- Changed default port to 5005 due 5000 port is not available to use in new MacOS versions

- Added an option to show full log information in a modal

- Fixed issue with column selector dropdown & mui v5

- Fixed advanced filters table population

- Changed date range selector picker for audit logs

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

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-27 12:42:20 -07:00
Harshavardhana
5f1e228d20 update mc deps to fix gjson CVE-2021-42836 (#1155) 2021-10-26 22:11:19 -07:00
Daniel Valdivia
bbe87ecd59 Enable gzip compression on assets (#1150)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-26 18:20:26 -07:00
Lenin Alevski
6f13cbaec1 Add Code Highlight to YAML editor (#1149)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-25 20:09:30 -07:00
Alex
cd47b0c118 Added sort functionality to ame, last modified & size columns in object browser list (#1151)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-25 20:00:34 -07:00
Lenin Alevski
972ea65a5d Implement logout endpoint for operator-ui (#1144)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-10-25 14:17:03 -05:00
Alex
d1e4ce2f31 Fixed error message on tenant creation wizard (#1143)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-25 13:33:46 -05:00
Daniel Valdivia
faf20f73b2 Bug: Tenant metrics not loading (#1142)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-22 14:41:51 -07:00
Alex
ac9f25fcd2 Changed background to white & added new shadow in title bar (#1141)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-22 14:23:54 -07:00
Alex
a4de76c3e2 Restructured settings page to use URL navigation (#1138)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-22 10:49:39 -07:00
Alex
3fabfb96c9 Updated material-ui dependencies to mui 5 & fixed issues with migration (#1119)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-21 20:20:27 -05:00
jinapurapu
caa282f003 Added functionality to delete icon on Policy Details screen (#1137)
* Added functionality to delete icon on Policy Details screen, typo fix in delete policy modal

* Removed unneeded text

* Updated field names
2021-10-21 19:11:46 -05:00
Kaan Kabalak
7065123490 Disable Download icon for folders (#1134)
Fixes #1133
2021-10-20 19:10:05 -07:00
Daniel Valdivia
b21aceed7b Release v0.11.0 (#1131)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-20 13:26:21 -07:00
Lenin Alevski
3b82079b8c Adding additional fields for openid configuration (#1132)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-10-20 11:33:07 -07:00
Klaus Post
854468a713 Return parseable error on S3 requests (#1120)
Return S3 compatible error when an S3 API request is made to the console port.

Before:
```
λ mc ls local9090
mc: <ERROR> Unable to list folder. XML syntax error on line 1: invalid character entity &display (no semicolon)
```

After:
```
λ mc ls local9090
mc: <ERROR> Unable to list folder. S3 API Request made to Console port. S3 Requests should be sent to MinIO API port.
```
2021-10-20 02:18:16 -07:00
Daniel Valdivia
1d69024e3a Add Help Box to multiple Screens (#1129) 2021-10-19 19:15:58 -07:00
Alex
67082e1b1d Fixed file download in list (#1130)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-19 18:57:07 -07:00
Lenin Alevski
95f622a597 fix: more fixes related to object name encoding (#1128)
- removing limitation of characters for paths/folders
- fixed object names with international characters inside paths

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-10-19 19:42:59 -05:00
Daniel Valdivia
37d7f0025b Remove tabs on Settings (#1127)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-19 17:14:59 -05:00
Daniel Valdivia
137170521c Limit add Tier and Add Notification Endpoint width (#1125)
* Limit add Tier and Add Notification Endpoint width

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

* Backlink component

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-19 13:12:13 -07:00
Daniel Valdivia
ba9f4d094b Fix base64 encoded prefix received on the server side for chinese characters (#1126)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-19 13:00:13 -07:00
Lenin Alevski
c62fecbac1 Fixes object name encoding/decoding crashing because of weird characters (#1124)
Fixes uploading, listing and managing objects with characters outside of
Latin1 range in file name

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-10-19 14:19:06 -05:00
Daniel Valdivia
3d858ac04a Limit Max Width of all containers to 1180px (#1123)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-19 12:47:28 -05:00
David Regla
573049e53c Add some missing config keys to settings panel (#1064)
Added missing keys: api, heal, scanner. Some 'api' keys were left out. Didn't add identity_tls as it isn't always available
2021-10-19 12:30:06 -05:00
Daniel Valdivia
9625d4679c Remove Review Step on Add Tenant (#1121)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-19 10:23:11 -07:00
Daniel Valdivia
790c6b0e2f Fix License Page Styles (#1122)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-19 10:16:29 -07:00
Lenin Alevski
ff433549b6 Operator-UI security context configuration (#1089)
- fix: check all pages are valid in  Add tenant wizard before enabling
  Create button
- Added: security context menu configuration for MinIO, logsearch api,
  postgres, prometheus and KES

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-10-19 09:42:36 -07:00
Daniel Valdivia
ccebc17f3f Fix Loading Quota stuck spinner (#1117)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-18 13:22:08 -07:00
Lenin Alevski
7c82306cc0 Fix: download objects and delete tags for object browser (#1118)
- fixed: download object from object browser fails because of file name
  not encoded in request
- fixed: deleting tags for object fails

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-10-18 13:05:10 -07:00
Alex
4d458c4f8c Updated Tiers module to be its own page (#1113)
Also refactored & did some cleanup in the code

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>
2021-10-15 12:35:04 -07:00
Alex
aadc66a739 Changed styles for range date selector in Prometheus dashboard (#1111)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-15 11:53:55 -07:00
Daniel Valdivia
ed73d99590 Make Lambda Notification Targets a page (#1105)
* Make Lambda Notification Targets a page

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

* Error messasge tweak

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

* Updated test cases

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-13 12:37:32 -07:00
Lenin Alevski
410b4555e3 Refactor session token (#1109)
- Update operator dependency
- Don't store policy on session token, instead obtain it during session
  validation

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-10-12 21:25:02 -07:00
Daniel Valdivia
2cae87aaed Release v0.10.4 (#1108)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-12 16:41:25 -07:00
Harshavardhana
b82441813d update to new minio/pkg v1.1.5 (#1107)
this update fixes dropping valid statements
as duplicates during iampolicy.ParseConfig()

fixes situations when users have overlapping
policies, then server should apply both
policies together.
2021-10-12 16:21:13 -07:00
Daniel Valdivia
5dfba3f6c8 Fix Broken Hop Cookies (#1106)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-12 14:35:12 -07:00
jinapurapu
1b9902a5be Prevent adding user with access key already in use (#1103)
* Release v0.10.3 (#1098)

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

WIP check if accesskey exists before adding user

* Added error when duplicate access key attempted

* Removed unneeded code

* Changed api to getUserInfo

* Corrected error messages

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-12 11:18:56 -07:00
Alex
d6944ccd3b Added zoom option to line charts & bar charts in prometheus dashboard (#1104) 2021-10-11 19:17:18 -07:00
Alex
ebaa1947de Changed number representations in Prometheus dashboard (#1101)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-10-11 12:32:27 -07:00
Daniel Valdivia
9d61af7060 Release v0.10.3 (#1098)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-05 13:00:12 -07:00
Daniel Valdivia
1b225e0901 fix: broken STS Sessions with large policies (#1096)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-10-04 14:25:00 -07:00
Alex
7a864d2631 Changed error modal snackbar (#1093)
Changed error modal snackbar to use a simplified style of global error snackbar. also fixed an issue where error was persistent if you closed the modalbox with an error present

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

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-09-30 09:25:34 -07:00
Daniel Valdivia
dfca19092a Dashboard Tweaks (#1091)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-28 16:36:59 -07:00
Alex
61cf397a02 Loaded correct version of the file for sharing (#1090)
Loaded correct version of the file for sharing when undefined is received in share window, this fixes an issue with objects list where non version was retrieved from backend

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>
2021-09-28 16:28:02 -07:00
Daniel Valdivia
d31528e2b5 Uptime Icon (#1088)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-09-28 16:23:25 -07:00
Alex
8fd1e0db9c Fixed widgets overlaps & some style adjustments in Dashboard (#1087)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-09-28 14:51:38 -05:00
Lenin Alevski
3d27cd2bd3 Multiple fixes for sub path and objects filename encoding (#1086)
- fix: objects with special characters (ie: /,&,%,*) won't open
- fix: create subdolders with special characters won't work, ie: /,&,%,*
- fix: view subfolders with special characters (ie: /,&,%,*) won't work
- refactor: browser breadcrumb
- fix: rewind enable/disable toggle button not working
- fix: undefined style for add bucket button in buckets page
- Added: validation for folder path naming
- refactor: encode prefix parameter using base64 to avoid url encode
  issues
- fix: share link for versioned object won't work because of wrong
  version_id

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-09-28 12:25:28 -07:00
Daniel Valdivia
2269af829f Release v0.10.2 (#1085)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-27 12:39:54 -07:00
Alex
8658ac2914 Improved the Share File modal (#1083) 2021-09-25 01:00:32 -07:00
Alex
19f034adf4 Embedded lato font in console project & removed google fonts dependency (#1080)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-09-24 14:27:05 -05:00
Alex
3034803054 Console portal-ui improvements (#1079)
- Updated dependencies in yarn lock

- Quick common card adjustment

- Warnings cleanup

- Updated assets

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-09-24 14:22:01 -05:00
Ravind Kumar
403f8caa8b Minor Typo Fix (#1081) 2021-09-24 09:29:06 -05:00
Alex
cb886f0130 Updated styles in Prometheus dashboard (#1078)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-09-23 10:01:56 -07:00
Daniel Valdivia
951a041bc5 Release v0.10.1 (#1076)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-22 16:08:06 -07:00
Lenin Alevski
8d203f4797 Case insensitive search for list objects (#1077)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-09-22 14:31:01 -07:00
Daniel Valdivia
401a051b8e Object Details Loading + NPE (#1075)
* Object Details Loading + NPE

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

* remove commented line

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-22 12:10:50 -07:00
Harshavardhana
2e300dba7d support multisite replication setup (#1072) 2021-09-22 12:04:27 -07:00
Daniel Valdivia
4cdb862ae6 Fix folder icon (#1074)
* Compute Pool Fields on Refresh

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

* Fix Folder Icon

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

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-09-22 11:44:58 -07:00
Lenin Alevski
e6f4ac1e6c Adds Azure support for KES configuration in operator-ui (#1070)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-21 20:56:07 -07:00
Lenin Alevski
137ff41be2 Display detailed errors when login fails (#1069)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-21 20:48:24 -07:00
Daniel Valdivia
e7665fae85 Compute Pool Fields on Refresh (#1067)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-09-21 20:40:40 -07:00
Harshavardhana
4b262f2a89 turn-off prefix-usage information per account for console (#1071) 2021-09-21 18:57:38 -07:00
dependabot[bot]
4ab1cf1bf2 Bump tmpl from 1.0.4 to 1.0.5 in /portal-ui (#1068)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-21 17:49:52 -07:00
Harshavardhana
27689a17f3 change server side uploader to fully streaming based (#1066)
this PR fixes the behavior to avoid `/tmp` folder as
staging directory for large uploads, instead rely on
the client upload stream itself to upload the object
entirely.
2021-09-21 17:43:43 -07:00
Lenin Alevski
2b6d5e5128 Fix oauth flow and remove go-oidc library (#1063)
- Update transport to use the same from Console in IDP Auth
- Validate provided idp URL

Co-authored-by: Harshavardhana <harsha@minio.io>
Signed-off-by: Ricardo Katz <rkatz@vmware.com>
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Ricardo Katz <rkatz@vmware.com>
Co-authored-by: Harshavardhana <harsha@minio.io>
2021-09-20 16:13:16 -07:00
Daniel Valdivia
64e38ca8d3 List buckets re-design (#1058)
* New Bucket Listing

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

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-09-20 11:13:34 -07:00
Lenin Alevski
d85b693751 Add share action to listed objects (#1052)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-09-20 10:42:50 -05:00
Harshavardhana
00752d2bb1 use cluster endpoint API to detect erasure coded setup (#1057) 2021-09-17 23:11:28 -07:00
Daniel Valdivia
4cc57fe440 Browser Theme Styling (#1056)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-17 19:23:00 -07:00
Minio Trusted
4c16789bab rename use_buildx -> use: buildx 2021-09-16 10:48:57 -07:00
Alex
2ade4ca1cf Added New styles to Dashboard (#1054)
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>
2021-09-16 09:43:37 -07:00
Daniel Valdivia
52ee9bb49b Reactive Tenant Details and Summary (#1051)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-15 21:11:46 -07:00
Daniel Valdivia
c93f1ba564 Release v0.10.0 (#1049)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-14 16:32:39 -07:00
Harshavardhana
b6f818bdd3 fix: add support for userInfo endpoint (#1048)
With support for GitLab OpenID service,
we need to make sure to support userInfo
endpoint for this MinIO server requires that
access_token is additionally sent along with
id_token as before to make sure we can fetch
additional claims from /userinfo endpoint.

This PR brings support on console for this
feature.

Refer https://github.com/minio/minio/pull/12469
2021-09-14 16:16:29 -07:00
Lenin Alevski
77eff6ce91 Additional image, music and video file formats for object preview (#1047)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-14 15:39:51 -07:00
Daniel Valdivia
15a9e72192 File Type Icons (#1046)
* File Type Icons

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

* One more font extension

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

* Fix FileZipIcon

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-14 15:33:03 -07:00
Daniel Valdivia
9f070d9ebb Fix Users with + in the name (#1045)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-14 15:23:38 -07:00
Daniel Valdivia
2077004bd3 Release v0.9.9 (#1042)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-14 09:06:51 -07:00
Harshavardhana
9067e85b55 fix: TLS issues with console (#1043)
This PR fixes two bugs one is

- incorrect termination of the HTTP connections
  when the resource URL path is `/`, since `/`
  doesn't exist we should never call h.ServeHTTP()
  instead should be directly served from public assets.

- add SSLHostFunc() such that if the Hostname is empty
  redirection is not empty and this value is handled
  properly when redirecting from 9090 to 9443.

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-13 20:09:19 -07:00
Daniel Valdivia
c30f1cee92 Policies Routing Wildcard (#1041)
* Policies Routing Wildcard

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

* Remove Console.log

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-13 18:08:02 -07:00
Daniel Valdivia
a060ddbef2 Collapsed Menu Icon (#1040)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-13 18:01:55 -07:00
adfost
8f202ef5a4 Allow set policy to none (#1039)
* policy bug fix

* rename button

Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
2021-09-13 17:46:09 -07:00
Daniel Valdivia
0fdf5ee0fc Add Tenant in non-linear way (#1027)
* Add Tenant in non-linear way

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-13 16:00:44 -07:00
Daniel Valdivia
875647577a Dashboard MinIO Version Icon (#1037)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-13 17:29:19 -05:00
Daniel Valdivia
46d504cddc Integration Test (#1012)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-13 12:45:54 -07:00
Lenin Alevski
27ac6db99a Preview WEBM files on object details (#1033)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-13 11:40:12 -07:00
Harshavardhana
3c8de3a8cf update prometheus request_total/request_errors dashboard queries (#1032) 2021-09-12 23:07:35 -07:00
adfost
e6086afdbe adding volumes page (#1019) 2021-09-10 21:13:30 -07:00
Daniel Valdivia
59f5f6a9f0 Default background color (#1030)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-10 22:44:23 -05:00
Daniel Valdivia
67b0261b0b Make Menu Collapsable (#1025) 2021-09-10 18:33:50 -07:00
Daniel Valdivia
e104c4a48e Fix Endpoints for Object Browser (#1028)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-10 16:31:41 -07:00
Alex
ba051dfb7d Added verification to server & drive cards for missing fields (#1022)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-10 16:14:24 -07:00
Harshavardhana
c26928516d fix: leaking fd's large object uploads (#1026)
Fixes multiple things

- Closes the local open files properly staged
  during multipart form upload.

- Removes these files upon upload properly, otherwise
  we run out of disk space on /tmp/ due to staging
  of these objects.

Co-authored-by: Minio Trusted <trusted@minio.io>
2021-09-10 14:36:58 -07:00
Daniel Valdivia
4135b27cfd Menu Re-Design Part 1 (#1021)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-09 16:45:37 -07:00
Alex
755e0b49e9 Cleanup of non used icons (#1018)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-09-09 11:41:33 -07:00
Alex
605f4d4a62 Object browser migrated into bucket details (#1017)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-09-09 12:39:03 -05:00
Daniel Valdivia
33acf45264 Release v0.9.8 (#1016)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-08 13:38:29 -07:00
jinapurapu
f229fee3ee Added version card to BasicDashboard (#1013)
* Added version card to BasicDashboard

* Added length check for servers array on version card render

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-09-08 11:38:32 -07:00
Bian Jiaping
21b3ed67af Eliminate usage of String.prototype.replaceAll to avoid incompatibility with old browsers (#1015) 2021-09-08 10:58:37 -07:00
Alex
90cadc76bb Applied workaround for MIME issue on windows (#1014) 2021-09-07 17:57:00 -07:00
Daniel Valdivia
b13b6db6f7 Share Icon updated (#1008) 2021-09-07 17:48:34 -05:00
adfost
1d88bb491d Disable create service account button if no policy (#1006)
* disable button if no policies

* merge fix

* finding group policies

* fixing style

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-09-07 15:02:04 -07:00
Daniel Valdivia
13cf3e6fa1 Release v0.9.7 (#1010)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-04 22:58:44 -07:00
Daniel Valdivia
50c1fe8298 Fix NPE on ServerInfoCard (#1009)
* Fix NPE on ServerInfoCard

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

* missing import

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-04 21:37:53 -07:00
Daniel Valdivia
39eeedec2c Add, Preview and Lock icons applied (#1005)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-03 12:37:53 -07:00
Daniel Valdivia
0f2a09d5f1 Release v0.9.6 (#1004)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-01 22:43:45 -05:00
Daniel Valdivia
6cf657a0e1 Add support for additional images (#1003)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-01 20:23:56 -07:00
Daniel Valdivia
1ba2627810 Two Column Basic Dashboard (#1002)
* Two Column Basic Dashboard

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

* Change title

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

* Remove Flex Grow

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-01 19:23:25 -07:00
Minio Trusted
1ab37e0b00 fix: update assets refresh 2021-09-01 17:53:55 -07:00
Alex
63dac87a75 misc small fixes warnings and imports (#1001) 2021-09-01 17:37:53 -07:00
jinapurapu
7bf3a6e3f1 Basic dashboard drives (#998)
* Added Disk properties to admin_info

* Added Disk properties to admin_info

* Created DriveInfo cards

* Fixed drive card formatting

* Added Disk properties to admin_info

Created DriveInfo cards

Added Disk properties to admin_info

Fixed drive card formatting

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-01 17:07:15 -07:00
Daniel Valdivia
2fd4be91ad Fix Navigation when reloading on a virtual path (#1000)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-09-01 16:56:06 -07:00
Alex
296129db02 File details preview (#997)
* Added support to object browser for file preview

* Added preview file content in object details

* Added support to object browser for file preview (#995)

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Jill <jill@minio.io>
2021-09-01 15:14:58 -07:00
Daniel Valdivia
5ece5ba8a7 Upscaled Icons (#996) 2021-09-01 17:09:26 -05:00
Lenin Alevski
96e9bce331 fix: Check if console is deployed with external certs for metrics proxy (#999)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-09-01 13:40:16 -07:00
Alex
ddd4ab54a7 Added support to object browser for file preview (#995) 2021-09-01 10:39:17 -07:00
adfost
849132fa19 Adding accesskey and secretkey for service accounts (#985)
* adding accesskey and secretkey for service accounts

* simplifying functions

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
2021-09-01 11:54:13 -05:00
Kaan Kabalak
d23a7a4fba Fix error not being displayed on faulty upload (#991) 2021-08-30 23:12:53 -05:00
Daniel Valdivia
af2a64d0d2 Fix icon for object browser and download icon (#989)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-30 12:43:16 -05:00
Alex
6cb8c51754 Restructured basic dashboard elements (#988)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-08-27 12:59:41 -05:00
Alex
48313d6cd9 Removed prometheus URL from error responses to avoid data leak (#986) 2021-08-26 14:36:57 -07:00
jinapurapu
bb8460a118 Created ServerInfoCard element (#984) 2021-08-26 12:22:46 -07:00
Daniel Valdivia
3e55683c2c Release v0.9.5 (#983) 2021-08-25 22:20:49 -07:00
Alex
d86fc2f73c Add missing slash for some API calls (#982) 2021-08-25 16:27:38 -07:00
Daniel Valdivia
24a2edf6a3 Implement New Icons (#981)
* Implement New Icons

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

* Update portal-ui/src/icons/TenantsOutlineIcon.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/icons/LicenseIcon.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/screens/Console/Common/TableWrapper/TableActionButton.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/icons/StorageIcon.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/screens/Console/Common/TableWrapper/TableActionButton.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/icons/IAMPoliciesIcon.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/icons/IAMPoliciesIcon.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/icons/IAMPoliciesIcon.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/icons/IAMPoliciesIcon.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/icons/IAMPoliciesIcon.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/screens/Console/Common/TableWrapper/TableActionButton.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-08-25 14:56:59 -07:00
Lenin Alevski
07bef3280d Remove ConsoleImage references (#980)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-08-25 11:23:11 -07:00
Daniel Valdivia
fa465d0ef3 Release v0.9.4 (#979)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-24 17:01:01 -07:00
adfost
1f1537fd60 access rule delete bug fix (#978)
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
2021-08-24 16:22:47 -07:00
Daniel Valdivia
597855364c Fix Bug Deleting Tenant PVCs (#977)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-24 16:01:25 -07:00
jinapurapu
4306d0f661 Added Server Info array to Basic dashboard (#963)
* Added Servers array to admin_info api

* Added TableWrapper, wrap

* Created Server table

* Added Servers array to admin_info api

Added TableWrapper, wrap

Created Server table

* Removed testing element

* Formatted server uptime with niceDays

* Added Servers array to admin_info api

Added TableWrapper, wrap

Created Server table

* Removed testing element

* Formatted server uptime with niceDays

* Formatted uptime using niceDays

* Sorted server table by endpoint

Co-authored-by: Harshavardhana <harsha@minio.io>
2021-08-24 11:13:26 -07:00
Daniel Valdivia
4c01be21ca Release v0.9.3 (#974)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-23 23:29:48 -07:00
adfost
7ec391b6e0 Add user service account (#966)
* add user service account

* changing API

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-08-23 21:36:55 -07:00
Daniel Valdivia
8c82124a57 Prometheus Security Context (#973)
* Prometheus Security Context

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

* Missing files

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-23 21:06:32 -07:00
Lenin Alevski
0ae0338a8f Delete Postgres & Prometheus PVCs (#972)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-08-23 14:09:21 -07:00
Harshavardhana
e05c724553 fix: probe content-type before upload (#968) 2021-08-23 12:59:04 -05:00
Daniel Valdivia
deda36a8b5 Fix Add Buckets button on Object Browser (#970)
* Fix Add Buckets button on Object Browser

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

* Comments

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

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-08-23 10:23:36 -07:00
Daniel Valdivia
d32ab25ffd Add missing Delete Pods roles for console-sa (#969)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-22 22:14:01 -05:00
Daniel Valdivia
2332a13477 Release v0.9.2 (#960) 2021-08-18 14:31:03 -07:00
adfost
c417cc31c8 Edit access rules (#959)
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-08-18 13:58:18 -07:00
Lenin Alevski
ec47df3cc1 Multiple fixes for operator-ui (#948)
- fix: create tenant from operator-ui was broken due to migration from
  standalone console to embedded console
- fix: refresh, activate and attach license in subscription page was
  broken
- fix: tenant usage report in operator-ui
- fix: show tenant encryption enabled if MINIO_KMS_SECRET_KEY is present

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-08-18 13:23:03 -07:00
Alex
a09be99ae6 Changed labels in create folder modal / button (#958)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-08-17 14:52:15 -07:00
Daniel Valdivia
2debb11f03 Release v0.9.1 (#957)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-17 13:39:28 -07:00
Alex
ba3a0d6cd6 Added pre validation of prometheus URL (#956)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-08-17 12:02:42 -07:00
adfost
4e8763995e Access Rules for bucket (#941)
* access rules

* separate DELETE API call

Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
2021-08-16 19:41:35 -07:00
Alex
dfe7e5aa58 Removed warnings from code (#955)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-16 17:47:45 -05:00
Daniel Valdivia
d2ed375efb Policy Details Update to look like the rest (#946)
* Policy Details Update to look like the rest

* Clear imports

* Address comments

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-08-16 15:10:07 -07:00
Daniel Valdivia
cabb60bd3f Remove Dupplicate Swagger definitions (#954)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-16 16:07:18 -05:00
Harshavardhana
0980bd38e7 use proper TLS transport for prometheus, log_search (#951) 2021-08-16 12:09:03 -07:00
Daniel Valdivia
6e1a23e0d6 Release v0.9.0 (#944) 2021-08-12 12:17:56 -07:00
Daniel Valdivia
6ea1d51913 New Page Title Look (#940)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-12 09:52:28 -07:00
Alex
4369e6e779 Adjusted Tenants wizard main height (#937)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-08-09 22:55:30 -07:00
Harshavardhana
79a476712f fix: handle crash in retention handler for object locked buckets (#936) 2021-08-09 23:23:40 -05:00
Daniel Valdivia
4e38a54dd8 Remove Console Field from Operator UI (#931)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-09 15:54:18 -07:00
Daniel Valdivia
33610a5269 Logos as React Components (#935)
* Select policies while creating new user

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

* Fix add user error

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

* Fix tests

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

* Logo as React Components

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-09 11:53:34 -07:00
Daniel Valdivia
a5a8d2ef62 Select policies while creating new user (#928)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-06 16:41:38 -07:00
Lenin Alevski
d357ef9bcb fix: proxy has to read credentials from configuration secret (#929)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-08-05 21:17:28 -05:00
Daniel Valdivia
3952ab0c4b Prepare Release v0.8.3 (#926)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-05 11:49:03 -07:00
adfost
c41c532d0f bug fix (#919)
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-08-04 12:01:41 -07:00
Daniel Valdivia
023622d95e Fix mixed buttons (#925)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-04 11:55:54 -07:00
Daniel Valdivia
e5dc8fea3a Fix Hop File Upload and Query Params (#920)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-04 11:37:45 -07:00
Lenin Alevski
56436f20e2 Operator Console bug fixes and MinIO configuration file support (#898)
- Added support for MinIO configuration file
- fix: tenant deployment with oidc integration
- fix: tenant deployment with ldap integration
- fix: certificate parsing for domains and IP addresses on security tab
- fix: console certificate upload was not working

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-08-03 17:36:26 -07:00
Daniel Valdivia
fcb74aee77 Fix Node Number validation (#918)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-03 11:18:51 -05:00
Daniel Valdivia
7e4d34958e Release v0.8.2 (#917)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-02 11:40:02 -07:00
adfost
9d6ee7f9b0 Changing error for too few nodes (#899)
* changing error

* change variable name

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-02 11:33:15 -07:00
Daniel Valdivia
aa16e75b39 Update Tenant Details and Fix Warnings (#915)
* Update Tenant Details and Fix Warnings

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

* Storage

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-08-02 10:50:41 -07:00
Alex
283a00bde2 Added custom metadata to object details (#914)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-08-02 10:20:29 -07:00
Daniel Valdivia
0c78359832 Tabs to Lists for Configurations, Policy (#913)
* Tabs to Lists for Configurations, Policy

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

* Fix Tests

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

* Logs

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-30 17:01:55 -07:00
Minio Trusted
ac7cefde39 update to v0.8.1 2021-07-29 14:58:36 -07:00
Daniel Valdivia
4f7f81bfb0 Improve error handling on proxy (#911)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-07-29 12:48:24 -07:00
Daniel Valdivia
64154cae38 Fix Bug Delete Folder (#912)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-29 12:18:50 -07:00
Daniel Valdivia
1689a73809 Tenant Details Tabs (#910)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-29 11:12:49 -07:00
Alex
e20ef0cfb8 Display Retention Policy details inside bucket details (#905) 2021-07-29 10:37:33 -07:00
Daniel Valdivia
e6dec7aa46 Style Background (#909)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-29 12:27:05 -05:00
Alex
efae5f6ae2 Enforced error type (#904)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-07-28 18:09:48 -07:00
Daniel Valdivia
988958f131 Redesigned Bucket Details. User Details. Account Screen. Login Error. (#903)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-28 17:53:53 -05:00
Alex
13844e10f8 Added new implementation for error handling (#901)
Now errors will display detailed information, modal box errors will prioritize detailed errors
2021-07-27 23:27:27 -07:00
Daniel Valdivia
87917e618c Fix bug not allowing to add webhooks (#900)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-27 23:26:54 -07:00
Alex
a2cde72347 Returned full error to browser. (#897)
This is first step of new error handling. UI rework will be done

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-07-26 16:25:55 -07:00
Minio Trusted
b84b80742c update to release v0.8.0 2021-07-23 18:55:16 -07:00
Alex
dcab568ea7 assets (#895) 2021-07-23 18:50:24 -07:00
Alex
4fdf9a1190 Fixed encoding & URL issues for users & groups pages (#896)
* Fixed encoding & URL issues for users & groups pages
* Update portal-ui/src/screens/Console/Users/ListUsers.tsx

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-23 18:37:34 -07:00
Alex
6c7bfe6514 Improved Tiers page (#894)
Added relevant instructions for tiers name & returned correct errors from MinIO

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-07-23 11:09:19 -07:00
adfost
419fa59923 New link (#893) 2021-07-23 12:34:13 -05:00
Daniel Valdivia
73fe08cd81 Remove Operator mode references in Console mode (#884)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-22 11:17:26 -07:00
Minio Trusted
b79c228890 fix: assets build missing entries in index.html 2021-07-21 22:18:37 -07:00
Alex
d88146459a Removed log search error message in console logs (#890)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-07-21 16:13:23 -07:00
adfost
2e1e4e4e80 Delete multiple objects (#856)
* delete multiple objects

* fixing capitalization

* make assets

Co-authored-by: Adam Stafford <adam@minio.io>
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-21 15:49:20 -07:00
Daniel Valdivia
6f7c026e4c Support for Hop into tenants (#878)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-21 15:09:49 -07:00
Alex
a6aa0f14c1 Added loading splash screen (#888) 2021-07-21 16:59:29 -05:00
Alex
2377959628 Improved FS Mode in console: (#889)
- Replaced legend for create bucket

- Hidden Heal in FS mode

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-07-21 14:44:00 -07:00
Daniel Valdivia
e91ce7ebbb Fix Log Db Volume size request (#886)
* Fix Log Db Volume size request

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

* Update operatorapi/operator_tenants.go

Co-authored-by: Harshavardhana <harsha@minio.io>

* Update operatorapi/operator_tenants.go

Co-authored-by: Harshavardhana <harsha@minio.io>

* Update operatorapi/operator_tenants.go

Co-authored-by: Harshavardhana <harsha@minio.io>

* Update operatorapi/operator_tenants.go

Co-authored-by: Harshavardhana <harsha@minio.io>

* Added humanize package

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

Co-authored-by: Harshavardhana <harsha@minio.io>
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-07-21 14:05:40 -07:00
Harshavardhana
87416b1fee fix: subnet health triggering OOM, infinite loop (#887) 2021-07-21 13:56:35 -07:00
Alex
dd0b791d9d Added FS Support & blocked non usable functionality in console (#880)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-20 19:02:33 -07:00
Daniel Valdivia
c31af8bb8c Fix bug when deleting objects with % in the name (#876)
* Fix bug when deleting object puts with % in the name

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

* Remove unused import

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-20 18:42:50 -07:00
Alex
9b6d14c752 Fixed policy page crash (#882)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-07-20 18:33:01 -07:00
Lenin Alevski
aa60ff9dd0 Initialize TLS configuration for operatorApi (#879)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-20 15:14:29 -07:00
Daniel Valdivia
804e3b04ad iFrame Support (#865)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-20 11:55:37 -07:00
Harshavardhana
bfedc14497 fix: avoid versioning list per objects 2021-07-19 17:46:37 -07:00
Daniel Valdivia
ff7c305345 Remove the last k8s import on restapi (#877)
* Remove the last k8s import on restapi

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-19 19:17:56 -05:00
Harshavardhana
2a6a6cab24 fix: properly support FS/Gateway mode (#874) 2021-07-19 12:24:35 -07:00
Daniel Valdivia
982ff0da5e Split Operator and Management API into different Swagger files (#875)
* Split Operator and Management API into different Swagger files

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

* Linting

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-19 11:48:50 -07:00
adfost
63582de380 adding int value functions (#852) 2021-07-16 16:53:07 -07:00
Minio Trusted
d8840cc810 update minio-go dependency to fix LDAP error logging 2021-07-15 14:21:37 -07:00
Daniel Valdivia
27489d9a3d Improve Object Download (#867)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-15 13:26:19 -07:00
Harshavardhana
7bd6d73663 fix: remove response timeouts for console (#864) 2021-07-14 11:29:32 -07:00
Lenin Alevski
54dfcbd378 Fix: derivedKey should not be a global variable (#862)
Embedded console was ignoring values set by CONSOLE_PBKDF_PASSPHRASE and
CONSOLE_PBKDF_SALT for generating new session tokens, derivedKey is used
to encrypt/decrypt session tokens generated by console

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-07-12 14:31:10 -07:00
Harshavardhana
445c0be5b1 fix: change password is implicit (#861)
Also only match actions do not need to match
dynamic values in resources.

fixes https://github.com/minio/console/issues/857
fixes https://github.com/minio/console/issues/858
2021-07-10 12:11:11 -07:00
adfost
373d576e54 Delete pods (#844)
Co-authored-by: Adam Stafford <adam@minio.io>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-07-09 09:56:29 -07:00
Harshavardhana
b19852a75a fix: upgrade to latest UBI 8.4 (#848) 2021-07-06 12:08:26 -07:00
Minio Trusted
a0e4a62278 fix: docker compose example 2021-06-30 23:53:26 -07:00
Lenin Alevski
7ca7c8278b Responsive License Page via Flex (#843)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-06-29 21:18:57 -05:00
Minio Trusted
ced3e64c61 update to release v0.7.5 2021-06-29 11:43:04 -07:00
Daniel Valdivia
b51d5505f3 Update readme screenshots (#842)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-28 15:35:11 -07:00
Daniel Valdivia
c73764bca1 Style Tenant Security Tab (#841)
* Style Tenant Security Tab

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

* Address comments

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-28 14:58:34 -07:00
adfost
531d8a2f4e Adding groups tab to Policy Details page (#837)
* parent 58efbbbf60
author Adam Stafford <adam@minio.io> 1624473190 -0700
committer Adam Stafford <adam@minio.io> 1624569868 -0700

policy groups

* restoring old commit files

Co-authored-by: Adam Stafford <adam@minio.io>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-28 12:53:29 -07:00
Harshavardhana
9ec73260c9 fix: client secret is optional in implicit flow (#840) 2021-06-28 12:49:21 -07:00
Anis Elleuch
173c3d43bb idp: Always use custom http client when generating tokens (#838)
x/oauth2 always wants a context with a custom http client embedded
when performing various requests. Ensure that the custom http client is
passed when requesting for a token.
2021-06-26 09:23:42 -07:00
Minio Trusted
c6eae4b807 update minio/pkg v1.0.8 2021-06-25 17:32:04 -07:00
Alex
58efbbbf60 Fixed some warnings (#834)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-06-24 12:38:41 -07:00
Lenin Alevski
616be03c0b CA Certificates in Operator-UI (#829)
- Bug fix: removing CA certificates for MinIO in operator-ui was broken
- Added missing file uplader for Console CA certificates

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-06-24 14:15:24 -05:00
adfost
c7e195b361 Add Filtering to Users on Policy Details (#833) 2021-06-23 22:03:21 -05:00
Daniel Valdivia
fa85ad9791 Make ElementKey optional (#831)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-23 11:03:55 -07:00
Daniel Valdivia
9f4d3f4586 Fix Bucket Replication listing (#832)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-23 10:57:19 -07:00
Alex
52075681c3 Added rewind functionality to console (#828)
* Added rewind functionality to console

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

* Fix for object details

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

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-22 23:10:54 -07:00
Harshavardhana
fd86e65e5e fix: console should trust itself with its own public.crt (#827) 2021-06-21 18:15:57 -07:00
Minio Trusted
b10c4f51b1 fix: log search URL, token environment variables 2021-06-18 16:03:29 -07:00
Harshavardhana
14604e0cba fix: lazily interpret environment values (#826)
using `init()` to initialize environment values
can cause problems when console is imported
into dependent projects.
2021-06-18 15:40:25 -07:00
Daniel Valdivia
83ca73ec0b Cross Compile in Parallel two archs at a time (#825)
* Cross Compile in Parallel two archs at a time

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

* Remove echo. Fix args

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-18 11:44:01 -07:00
Daniel Valdivia
b14d67eead Parallelize PR check stages (#824)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-18 13:23:39 -05:00
jinapurapu
6166223995 Moved Change User Password and added password length check (#820)
* Moved Change User Password and added password length check

* Remade assets

* Moved Change User Password and added password length check

* Rebuilt assets

Co-authored-by: Jill <jill@minio.io>
2021-06-18 11:22:09 -07:00
Daniel Valdivia
61cf109fd6 Global Refresh for Tenant Details (#822)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-18 11:22:51 -05:00
Junlin Zhou
d372a2cd7a update TLS section in README (#777)
Replace the mismatched TLS port in the documentation
2021-06-17 22:59:00 -07:00
Daniel Valdivia
2d6b5ecbc6 Re-organize Pod Details (#821)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-17 19:12:52 -07:00
Lenin Alevski
85797749ba Security Tab for operator-ui (#804)
Security Tab allow users to set various configurations related to TLS
certificates for MinIO and Console

- Enable/Disable AutoCert
- Add/Delete MinIO and Console Certificates
- Add/Delete MinIO and Console CA Certificates

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-06-17 17:30:20 -07:00
adfost
09503ed0c8 Pod Events (#807)
* Pod Events

* restoring files

* restoring files

* make assets

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Adam Stafford <adam@minio.io>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-06-17 16:24:22 -07:00
Daniel Valdivia
34b05bd426 Fix Singel Value widget not rendering on tab switch (#819)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-17 18:01:19 -05:00
Alex
11eb587610 Improved trace functionality & added filters support (#817)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-06-17 12:21:25 -07:00
Harshavardhana
13f9f6c848 fix: do not use var to define global sets (#818)
console when imported cannot honor certain environment
values, we need to make sure to read it directly from
environment.
2021-06-17 00:50:56 -07:00
Alex
03c24c6f14 Fixed issue with comparison & prettier (#815)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-06-16 16:36:50 -07:00
Daniel Valdivia
0c8025b39f Bring Tenant Metrics to Tenant Details (#813)
* Bring Tenant Metrics to Tenant Details

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-16 16:50:04 -05:00
Alex
7117d87546 Changed field names & removed bottom texts (#816) 2021-06-16 12:38:29 -05:00
Harshavardhana
55531d605b fix: allow TLS access on multiple SNI certs (#812)
if GetCertificate() is set never set tls.Certificates
2021-06-15 17:52:39 -07:00
Alex
e32819034a Added create Namespace functionality to Add Tenant screen (#809)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-06-14 18:00:20 -05:00
Harshavardhana
f208ce5382 fix: GetAllCertificatesAndCAs shouldn't fail internally (#810)
all libraries in pkg/* should never be called Fatal()
internally, the console is imported now and it is important
that the failure logging etc is all well controlled.

Bonus: update to latest minio/pkg v1.0.6 to get trial
customer license verification fixes.
2021-06-14 10:41:34 -07:00
Alex
31d18efa9a Added create namespace API (#808) 2021-06-14 12:04:57 -05:00
Harshavardhana
4d62fe1638 add releases to quay.io from next release (#811) 2021-06-11 18:36:27 -07:00
jinapurapu
11d0080488 Move change user password modal (#806) 2021-06-11 17:24:41 -05:00
Alex
8bea9ab2a5 Implemented an autocomplete component (#803)
This component can be used as a replacement for select component
2021-06-11 15:32:07 -05:00
Alex
480e6d7980 Connected filters for bucket details sections (#801) 2021-06-08 19:47:26 -05:00
Minio Trusted
4fc95ae17d remove the shotfile source line 2021-06-08 16:24:50 -07:00
Alex
d5a3fee0be Updated dependencies for console. (#800)
There is one fix that needs to be applied once create-react-app delivers a new update. Please refer to https://github.com/facebook/create-react-app/issues/11053
https://github.com/facebook/create-react-app/issues/11053

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-06-08 16:21:48 -07:00
Harshavardhana
6791631904 upgrade swagger version to v0.27.0 (#798) 2021-06-08 14:35:39 -05:00
Alex
6f0df68200 Removed not available comparison (#797) 2021-06-08 12:35:38 -05:00
Daniel Valdivia
9a8106d714 Add missing resource to cluster role (#796)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-07 22:28:53 -07:00
dependabot[bot]
991043822b Bump ws from 6.2.1 to 6.2.2 in /portal-ui (#793)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 22:27:20 -07:00
Harshavardhana
91f165ca32 update operator to latest master (#792)
this is to remove logsearchapi dependency
on audit.Entry structure from MinIO server.
2021-06-07 20:53:03 -07:00
Alex
c2dc7391e4 Added URL navigation to tenant details (#795)
Added URL navigation to tenant details and fixed a couple of warnings

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-06-07 20:23:14 -07:00
Daniel Valdivia
bb0f613f5b Move log code out of auto-generated files (#791)
* Move log coude out of auto-generated files

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

* Configure API

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-07 19:30:53 -07:00
adfost
ecab89f7fb Pod Details (#789)
* Introduce dropdowns for node selector screen on affinity

Fixes https://github.com/miniohq/engineering/issues/138

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

* pod logs

* fixing test cases

* adding paper

* style for pod logs

* dealing with style errors

* Delete logs.log

* using new Affinity.tsx

* moving loadinfo

* moving loadinfo and adding dependencies

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Adam Stafford <adam@minio.io>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-06-07 18:56:05 -07:00
Lenin Alevski
69055c492e ReadOnly filesystem error when loading certificates (#794)
Read-only file-system, ie: when console is running as container in kubernetes, was
preventing console to run because of an error during creating
directories

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-06-07 16:33:47 -07:00
Harshavardhana
07fbb8b8f7 rewrite logging in console (#788)
- enhance logging throughout the codebase
- all packages at pkg/ should never log
  or perform log.Fatal() instead packages
  should return errors through functions.
- simplified various user, group mapping
  and removed redundant functions.
- deprecate older flags like --tls-certificate
  --tls-key and --tls-ca as we do not use
  them anymore, keep them for backward compatibility
  for some time.
2021-06-04 11:35:55 -07:00
Alex
b65f04a2b5 Fixed assets in console master (#790) 2021-06-04 12:50:26 -05:00
Harshavardhana
83d6620fe3 remove various unexpected features in console (#782)
- Unix listeners are removed
- KeepAlive, IdleTimeout etc are removed
- Authorization logic is simplified
- Added support for MINIO_PROMETHEUS_JOB_ID
2021-06-03 18:04:08 -07:00
Lenin Alevski
b1aedf813f AGPL License Modal in License page (#786)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-03 16:40:04 -07:00
Daniel Valdivia
76bdd9dded Introduce tabs for Dashboard (#785)
Also fixes the sync button

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-03 16:02:45 -07:00
jinapurapu
a9e82eb909 #616 added modal on icon click (#747)
* Added refresh tenant functionality

add icon to Users page to change password

commit work to date to github for ongoing use

add modal with fields for current and new password on icon click

missing swagger files

remove unneeded files

move changeUserPassword to admin_api, remove field for current password,
include selected user

Please enter the commit message for your changes. Lines starting

added missing js files

asset and function signature

formatting changes

* fixed lint

* removed Current Password field, returned Groups label, added
selectedUser to modal text

* disabled save button if newPasssword and reNewPassword don't match, removed commented out code

* Added refresh tenant functionality

add icon to Users page to change password

commit work to date to github for ongoing use

add modal with fields for current and new password on icon click

missing swagger files

remove unneeded files

move changeUserPassword to admin_api, remove field for current password,
include selected user

Please enter the commit message for your changes. Lines starting

added missing js files

asset and function signature

formatting changes

* removed Current Password field, returned Groups label, added
selectedUser to modal text

* changed Swagger parameters to camel case

Co-authored-by: Jill <jill@minio.io>
2021-06-03 15:32:22 -07:00
Daniel Valdivia
f18360416b Add Tenant Health Details (#780)
* Add Tenant Health Details

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

* Colors

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-02 16:26:08 -07:00
Daniel Valdivia
8ca6401ac0 Introduce dropdowns for node selector screen on affinity (#779)
* Introduce dropdowns for node selector screen on affinity

Fixes https://github.com/miniohq/engineering/issues/138

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

* Lint

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-06-02 15:48:17 -07:00
Harshavardhana
c1e41e6b0a allow console to listen on ipv6 (#781)
also converge tls-host and host, because hostnames
have nothing to do with HTTP or HTTPs they are the
same for both HTTP and HTTPs. Deprecating the
older flag `--tls-host` but it will still be honored
as hidden flag.
2021-06-02 14:33:09 -07:00
Harshavardhana
1b7fb2ae7a move to master direct-csi (#778)
this removes the last remaining vestibule minio/minio
dependency from all console cross dependencies
2021-06-01 15:31:43 -07:00
Harshavardhana
eff001b12f move to madmin-go/, pkg/ packages (#765) 2021-06-01 11:34:55 -07:00
dependabot[bot]
9498f8dcb5 Bump dns-packet from 1.3.1 to 1.3.4 in /portal-ui (#774)
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-30 21:34:26 -07:00
adfost
5782b9d9a2 adding test case for bucket users (#773)
Co-authored-by: Minio Trusted <trusted@minio.io>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-28 18:28:39 -07:00
Daniel Valdivia
7db4e187ec List Service Accounts for a User (#775) 2021-05-28 17:46:36 -07:00
Daniel Valdivia
c95bc64dbe Enable Bucket Quota on Bucket Details (#776)
* Enable Bucket Quota on Bucket Details

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

* warnings

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

* remove uselss br

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-28 17:21:45 -07:00
Minio Trusted
16647b88e9 update to v0.7.4 2021-05-27 16:32:21 -07:00
Daniel Valdivia
59c4ac6336 Add Sync, Bandwidth and Health Check Period to replication set (#771)
* Add Sync, Bandwidth and Health Check Period to replication set

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

* Update Columns

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

* Add Prefix and Tags

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

* Last fields

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-27 16:25:00 -07:00
Minio Trusted
49f0b83613 instead of go get use 'go install' 2021-05-26 10:54:27 -07:00
Alex
622f9ed3cd Added URl routing for tabs in buckets (#769)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-05-25 16:16:15 -07:00
Daniel Valdivia
213d7589c6 Latest Assets (#768)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-24 14:10:12 -07:00
Minio Trusted
0a4f02bd83 update to v0.7.2 2021-05-24 11:53:05 -07:00
Alex
db9b61677c 20 seconds timeout removal (#767)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-24 11:48:41 -07:00
Daniel Valdivia
003eaaea76 Group bucket users and policies under access tab. Rename ViewBuckets to BucketDetails (#766)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-24 11:11:39 -07:00
Alex
d8350625f3 Added routes to tab selection in storage (#761)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-05-21 15:40:39 -07:00
Daniel Valdivia
6b2043c832 Dashboard widgets async (#762)
* Make Widgets load asynchronously

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

* Added loading spinners to all widgets

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-21 10:24:16 -07:00
Daniel Valdivia
87cb36c944 Fix PVC list so it's only tenant PVCs. Fix NPE on pod listing. (#764) 2021-05-21 07:55:53 -07:00
Alex
59d4ebc109 Fixed issue with graphs that are not showing series correctly (#763)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-05-20 17:42:39 -07:00
Lenin Alevski
6eabff3d96 Add support for custom KES image in tenant (#759)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-05-20 12:31:57 -07:00
adfost
1267f989b2 fixing duplicated usernames (#760) 2021-05-20 12:33:18 -05:00
Daniel Valdivia
2895804e0f Make list of policies on UserDetails clickable. Fix Warnings. Add latest assets (#758)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-20 09:45:53 -07:00
adfost
c2171fafde User policies (#744)
* adding policy users and new UI page

* Prettier + aligment

Co-authored-by: Adam Stafford <adam@minio.io>
2021-05-19 15:18:59 -07:00
Daniel Valdivia
b0f1f88b5b Remove Excessive Logging. Add missing labels for metrics. (#753)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-18 09:06:31 -07:00
Daniel Valdivia
8917f415cc Line Break for Tenant Details (#751)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-17 14:16:03 -07:00
Alex
40aca3da79 Changed Labels for storage section (#750)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-05-17 11:52:20 -07:00
Daniel Valdivia
cf27e20bf2 Add the current state to tenant details. Fix Enable/Disable Encryption (#749)
* Add the current state to tenant details

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

* Fix the Enable

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

* Linting

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-17 11:29:11 -07:00
Daniel Valdivia
3b10eb58ea Update View Bucket screen (#746)
Also add a few refresh screen buttons and remove duplicate titles

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-14 17:05:02 -07:00
Lenin Alevski
98b4012dde Change bucket encryption configuration UI (#745)
Replace checkbox with pencil icon component to open the bucket
encryption configuration

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-05-14 15:54:14 -07:00
Daniel Valdivia
2769ba145a Add features box to tenant details (#738)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-14 17:04:29 -05:00
Alex
9c5a788dae Added PVCs section & direct CSI panel (#742)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-05-14 13:20:36 -07:00
Alex
a06636035a Added sync icon to get information button (#743)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-05-14 10:13:24 -07:00
Daniel Valdivia
1808027fa1 Latest Assets only (#741)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-13 10:15:31 -07:00
Alex
3ac22d48d5 More Widgets fixes (#739)
* Fix the Prometheus queries

Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>

* Add missing steps

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

* Enabled missing axis & fixed labels

Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-05-12 17:52:21 -07:00
Daniel Valdivia
288bf01dd8 Permanently enable ILM (#740)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-12 16:32:15 -07:00
dependabot[bot]
d546f05e11 Bump hosted-git-info from 2.8.8 to 2.8.9 in /portal-ui (#736)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-05-12 16:08:29 -07:00
Alex
5c73137d60 Fixed Console Widgets to match grafana information (#737)
* Fixed Console Widgets to match grafana information

* Fix the Prometheus queries

Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>

* Add missing steps

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

* adjust interval

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

* Fixed inconsistence with backend names

* Reimplemented step calc to avoid issues on multime times request

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2021-05-12 13:35:14 -07:00
Daniel Valdivia
1daec71271 Update Console Prometheus Widgets (#731)
Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-05-10 20:12:15 -07:00
Minio Trusted
3a519cdcfa update to v0.7.1 2021-05-10 19:11:30 -07:00
Daniel Valdivia
a2dce5fa9f Show error when editing tenant Yaml (#733)
* Show error when editing tenant Yaml

Also adds error line when we prepareError()

Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>

* make certain metadata fields editable

Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-05-10 19:08:22 -07:00
Daniel Valdivia
3a7da72919 Fix NodeSelector Screen (#732)
This makes it so the node selector logic is different from podAffinity

Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-05-10 17:34:54 -07:00
dependabot[bot]
4f0752c9fc Bump url-parse from 1.4.7 to 1.5.1 in /portal-ui (#728)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-05-10 16:18:53 -07:00
Daniel Valdivia
59d074c7a9 Allow to edit Tenant YAML (#727) 2021-05-10 17:27:52 -05:00
Daniel Valdivia
c5a8ad3168 Remove duplicated logic (#730)
We were adding the users secrets twice, this consolidates the logic so it's only once and we don't do it if external IDPs are configured

Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-05-10 11:31:56 -07:00
Daniel Valdivia
b86a992a33 Fix bug when adding multiple built-in users (#729)
There was a problem with the root credentials being added as a user, and the name of the built in users had collisions with the root credentials

Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-05-10 10:56:10 -07:00
Daniel Valdivia
24410e7c85 Make user details a page (#726) 2021-05-08 00:00:29 -07:00
Ravind Kumar
ffb3362f79 Update Console metrics dashboard (#724) 2021-05-07 20:59:25 -05:00
Lenin Alevski
f5beb90608 Hide users tab from bucket view when LDAP is enabled (#719) 2021-05-07 17:48:03 -07:00
Alex
cc02b21632 Fixed missing object in swagger (#725)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-05-07 14:14:54 -07:00
adfost
281f8d553a Adding list of pods (#715)
* changing delete button

* committing so I can swich branches

* adding pods

* showing only pods with given tenant

* pull request fixes

* changing pod selection algorithm

* changed the pods API

* Delete admin.json

* Update portal-ui/src/screens/Console/Tenants/TenantDetails/TenantDetails.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

* Update portal-ui/src/screens/Console/Tenants/TenantDetails/TenantDetails.tsx

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>

Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
Co-authored-by: Adam Stafford <adam@minio.io>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-05-06 18:57:14 -07:00
Daniel Valdivia
cc52e267eb Build assets automatically (#721) 2021-05-05 17:24:21 -05:00
Alex
7fdc02aec8 Returned multi user list in tenant created modal (#718)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2021-05-05 14:33:55 -05:00
Minio Trusted
29e1af3363 update to v0.7.0 2021-05-05 11:24:26 -07:00
Daniel Valdivia
8a635fc0d7 Make Log Search and Prometheus images configurable (#717)
Three new fields were added to let users customize the docker images for log search and prometheus

Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-05-04 14:46:10 -07:00
Alex
35da684ec9 Added direct-csi API support to console (#710) 2021-05-04 11:56:33 -05:00
Daniel Valdivia
8cfa41eb53 Make Tabs Scrollable (#714)
This makes so tab components are scrollable if the resolution on the screen demands it

Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-05-03 13:19:35 -07:00
Alex
08e40fe632 Fixed issue with namespace not returning error (#709)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-05-03 08:38:20 -07:00
Alex
0b0cb785b5 Fixed small issues & removed warnings in console (#711) 2021-04-27 21:55:16 -07:00
Daniel Valdivia
5838606789 Improvements to Built-In users (#708) 2021-04-27 13:07:25 -07:00
Alex
38f95e3b28 Added affinity support to tenant add screen (#706) 2021-04-26 18:40:09 -07:00
Daniel Valdivia
0c90785ed0 Remove printing of tenant yaml (#705)
Signed-off-by: Daniel Valdivia <hola@danielvaldivia.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-04-26 10:35:45 -07:00
Alex
62d762318f Tiers & lifecycle implementation (#638) 2021-04-24 14:31:47 -07:00
adfost
097e6e9825 changing delete button (#704)
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-04-23 15:56:06 -07:00
Alex
9e35db0642 Added validation for single tenant in namespace (#701)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-04-23 13:38:02 -07:00
Lenin Alevski
3b55d63211 Attaching subnet license to existing tenants fails (#702)
Uses the right tenant namespace to update console secrets instead of the
wrong operator namespace

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-04-23 12:58:37 -07:00
Alex
2981e63797 Fixes an issue with empty logsearch & prometheus configurations (#703) 2021-04-22 20:54:17 -07:00
adfost
ca742b781f Adding key creation in tenant wizard. (#697)
Signed-off-by: Adam Stafford <adam@minio.io>

Co-authored-by: Adam Stafford <adamstafford@MacBook-Pro-van-Adam-2.local>
2021-04-22 14:18:14 -07:00
dependabot[bot]
d60cac0122 Bump ssri from 6.0.1 to 6.0.2 in /portal-ui (#698)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-04-20 23:59:09 -07:00
Alex
62745e9ff2 Added log search & prometheus extra params configuration (#700) 2021-04-20 23:39:14 -07:00
Alex
c81da22e8a Added storage class selector to add pool modal (#699)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-04-19 18:26:22 -07:00
Minio Trusted
c07b7b4772 update to v0.6.8 2021-04-19 14:42:47 -07:00
Minio Trusted
6cb703685b update to v0.6.7 2021-04-14 14:26:09 -07:00
Alex
7a3c2a3cf8 Disabled selected buttons in table wrapper (#692)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-04-14 14:20:30 -07:00
Alex
d8ac8cc1e3 Merged object locking & access policy cards into a single one for bucket details (#691)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-04-14 12:52:29 -07:00
Daniel Valdivia
0e492dae67 Add Restruct with policy selector in add SA modal (#689) 2021-04-13 16:16:53 -07:00
Alex
b72217764a Removed center alignment of forms in full screen (#690)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-04-13 15:51:39 -07:00
Lenin Alevski
26bcbb896a Remove unecessary default scopes for IDP integration (#686) 2021-04-08 14:04:32 -07:00
Lenin Alevski
7b4254f525 Display errors during IDP authentication (#685) 2021-04-06 00:38:11 -07:00
Alex
68ea3b5d05 Fixed double scroll issue in modal wizard (#684)
Also changed grid classes for wizard/ modal-wizard
2021-04-05 20:31:00 -05:00
Alex
8a51570d14 Added replication bulk modal to buckets list (#665)
* Added replication bulk modal to buckets list

* Disabled buttons & inputs in loading state

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-04-05 16:20:08 -07:00
Daniel Valdivia
9c6ed83d63 make tenant breadcrum clickable (#683) 2021-04-02 17:04:55 -07:00
adfost
4f29f8457f Api bucket policy (#674)
* Adding API for Users with Access to Bucket

* changing error logging

* Delete .yarn-integrity
2021-04-02 17:13:29 -06:00
Lenin Alevski
94747acab2 fixes issue about displaying documentation link multiple times (#681) 2021-04-01 23:02:45 -07:00
Alex
d8360737ee Fixed max width in wizard panels & issue in wide screens for input switchers (#679)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-04-01 18:35:33 -07:00
Daniel Valdivia
bb91cb66b0 Operator UI improvements (#678) 2021-04-01 16:13:57 -07:00
Lenin Alevski
ce473b9286 Adding references for operator and console links in license page (#675) 2021-03-30 17:01:56 -07:00
Minio Trusted
14fe7c1269 update to v0.6.6 release with service 2021-03-27 17:06:01 -07:00
Lenin Alevski
b6938a5888 Check xcerts.Manager is initialized before adding certificates (#673) 2021-03-27 15:35:45 -07:00
Minio Trusted
901358e8d4 update to release v0.6.5 2021-03-27 13:26:58 -07:00
Lenin Alevski
5155aef802 Add support to load certificates from swagger tls flags (#672)
- Add support to load certificates via `--tls-certificate`, `--tls-key`
  and `--tls-ca` flags (standard TLS flags for the swagger server)
- Certificate keypair will be added to the certificate pool used by the
  Console server
2021-03-27 12:21:59 -07:00
adfost
23b3283014 Adding Bucket Policies UI to ViewBucket.tsx (#669)
* Adding ViewBucket.tsx

* Update ViewBucket.tsx

Co-authored-by: Adam Stafford <adam@minio.io>
2021-03-26 10:06:38 -07:00
Daniel Valdivia
53eb59f5ad Disable Bucket/Replication (feature) if not enough permissions (#662)
* Bucket/Replication (feature) if not enough permissions

* Address comments

* Remove Consts fetchPerms
2021-03-25 10:10:54 -07:00
Minio Trusted
e088431c62 update to v0.6.4 2021-03-23 17:45:51 -07:00
Lenin Alevski
8bb982b39f update ldap development example (#664) 2021-03-23 15:09:44 -06:00
Daniel Valdivia
744ccea842 Add Bucket Locking option and fix versioning configuration. (#661)
* Add Bucket Locking option and fix versioning configuration.

* Addres comments

* Rework the View Bucket options

* Remove extra padding
2021-03-22 16:28:07 -07:00
Daniel Valdivia
19195e0cd0 Interactive Feedback when list objects take a long time (#655)
* Interactive Feedback when list objects take a long time

* Remove cancel button

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-03-22 11:36:46 -07:00
Lenin Alevski
7ce36bac42 console license page improvements and fixes (#647)
- fixed issue when deploying tenant with tls disabled
- applied new design for tenant details and license screens
- added license refresh job to operator console
- added new refresh license endpoint
- console operator not longer store CONSOLE_ACCESS_KEY and
  CONSOLE_SECRET_KEY values in the tenant-console-secret

Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-03-22 11:08:31 -07:00
Daniel Valdivia
2a704d3d59 Allow to assign multiple policies to to a user or group (#646)
* Allow to assign multiple policies to to a user or group

* Latest assets
2021-03-22 10:45:31 -07:00
dependabot[bot]
897b5b8be5 Bump react-dev-utils from 11.0.1 to 11.0.4 in /portal-ui (#644)
Bumps [react-dev-utils](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-dev-utils) from 11.0.1 to 11.0.4.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/HEAD/packages/react-dev-utils)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-03-19 22:18:24 -07:00
Alex
03dc83af3a Added versioning edit in console (#645) 2021-03-19 17:48:58 -07:00
adfost
26f7982323 api for listing policies attatched to a bucket (#660)
api for listing policies attatched to a bucket
2021-03-19 16:00:56 -07:00
dependabot[bot]
934e8c9f4c Bump elliptic from 6.5.3 to 6.5.4 in /portal-ui (#640)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-18 18:05:15 -07:00
Cesar N
e780f24fb9 Add list direct-csi drives api (#643)
Add direct-csi volumes list api

Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-03-18 12:10:05 -07:00
Lenin Alevski
c48a024310 Remove user secret key from encrypted session token (#652)
User secret key is not really need it to be stored inside the encrypted
session key, since the `change-password` endpoint requires the user to
provide the current `secret key` that password will be used to
initialize a new minio client then we will leverage on the
`SetUser` operation, this api only works with actual user credentials
and not sts credentials
2021-03-18 10:27:27 -07:00
Minio Trusted
3fcf278460 rename Readme.md as README.md github friendly name 2021-03-11 21:26:28 -08:00
Nitish Tiwari
8b6202296e Add Docker compose file for quick deployment on non k8s envs (#639) 2021-03-11 21:24:38 -08:00
Alex
7030e80ac8 Allowed edit in policies create form (#642) 2021-03-11 16:48:01 -06:00
Alex
6bed9f8f97 Fixed issue with routes (#641) 2021-03-10 13:39:07 -06:00
Cesar N
e7263c9a89 Show object versions on UI only when bucket has versioning enabled (#637) 2021-03-10 12:37:43 -06:00
Lenin Alevski
9c1e87b1be Improvements on change-password errors page (#635)
- Returning correct error when user is unable to change password
- Added support for enable/disable UI elements based on allowed apis
2021-03-09 19:32:09 -06:00
Alex
6f98ecc59f Revert "Tiers & lifecycle implementation (#615)" (#636)
This reverts commit ac77b8b441.

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-03-09 14:07:53 -08:00
Alex
ac77b8b441 Tiers & lifecycle implementation (#615)
* Tiers & lifecycle implementation

* Add a feature flag for ILM

* Update pkg/auth/idp/oauth2/provider.go

Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2021-03-09 12:36:48 -08:00
Alex
d4a69978fc Added loader & notification for files download (#634)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-03-09 09:29:54 -08:00
Alex
81087ae910 Added validation for users to not delete their own account (#633)
Also Implemented an option to show / hide actions in table wrapper

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-03-08 21:38:19 -08:00
Cesar N
ebab2e1648 Update docs for go version required (#632) 2021-03-05 17:59:55 -06:00
Harshavardhana
9a875a6f14 add console systemd service (#627)
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-03-05 15:20:22 -08:00
Alex
abc9f2b428 Limited input width size for forms in wide screens (#628)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-03-05 12:30:01 -08:00
Daniel Valdivia
a2a09b8db1 Upgrade to Go 1.16. Remove Go-Bind-assets in favor of embed. (#630)
* Upgrade to Go 1.16. Remove Go-Bind-assets in favor of embed. Checking Portal-UI Build folder.

* lint

* Remove assets references

* Fixes for sub fs

* Fix lint
2021-03-05 10:39:17 -08:00
Alex
716aabe782 Fixed max size for widgets (#624)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-03-04 16:09:22 -08:00
Alex
07a23ab374 Fixes issue in settings page with CSV multiselector scroll (#622)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-03-04 14:53:47 -08:00
Cesar N
e7838ebc47 Add right image for logsearchapi (#626) 2021-03-03 16:26:44 -08:00
Minio Trusted
e6705b685c update to v0.6.3 2021-03-02 20:46:04 -08:00
Alex
6b11d403a6 Add Tenant page refactor (#617)
Refactored add tenant page to be working with reducers & settings styles
2021-03-02 20:18:53 -08:00
Daniel Valdivia
8958cbec69 Fix container image for log search (#619) 2021-03-02 11:07:31 -06:00
Lenin Alevski
5ef66c3cfc Fixes for license page (#620) 2021-03-01 22:25:08 -08:00
Harshavardhana
d4395e1409 add update command to self-update console (#618) 2021-03-01 16:30:53 -08:00
Minio Trusted
8a4139c8e7 update to v0.6.2 2021-02-26 13:01:28 -08:00
Lenin Alevski
34bcd25c9f Disable Users and Groups Menu options when LDAP is enabled on MinIO (#614) 2021-02-26 11:20:17 -08:00
Minio Trusted
7853aa6bb9 update to v0.6.1 2021-02-25 10:20:32 -08:00
Lenin Alevski
9c1f0c47b0 Custom HTTP Client TLS transport for STSWebIdentity (#612)
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-02-25 09:09:55 -08:00
Daniel Valdivia
6ac95e40a4 Get Tenants endpoints check hostname (#609) 2021-02-23 12:49:46 -08:00
Joshua Hoblitt
70fb7291f5 fix docker "dev" tag string (#611) 2021-02-23 10:28:05 -08:00
Lenin Alevski
4b28bf5921 New design for License Page (#608) 2021-02-22 16:41:17 -08:00
jinapurapu
99d5e71512 Added refresh tenant functionality (#604)
* Added refresh tenant functionality

* Delete bindata.go

Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
2021-02-18 17:33:00 -08:00
Minio Trusted
2a5c1afbdf release console version v0.6.0 2021-02-18 12:23:47 -08:00
Lenin Alevski
51a9482e91 Fixes issue that prevents LDAP users to authenticate (#605) 2021-02-18 13:06:02 -06:00
Harshavardhana
d01eeb43a7 update minio dependency to latest release (#603)
iam/policies now support wildcard actions for
all actions such as 's3:Get*', 's3:Put*'

new policies such as CreateBucket now honors
LocationConstraint set but rejecting calls
that do not honor region.
2021-02-16 12:53:18 -08:00
Alex
7121dbfcea Replaced help icon in console (#602) 2021-02-12 20:22:05 -08:00
Lenin Alevski
e5fc6e3125 AWS KMS Operator-UI fix (#601)
- Operator UI was not passing AWS KMS configuration on create tenant
  request
2021-02-12 18:15:03 -06:00
Lenin Alevski
396d8fbcfc GCP KMS many fixes (#600)
- Operator-UI didnt correctly append gcp kms configuration
2021-02-12 09:20:36 -08:00
Daniel Valdivia
f958b73e48 Show Credentials after adding tenant (#599)
* Show Credentials after adding tenant

* assets

* Change order of routing
2021-02-10 21:09:35 -08:00
Lenin Alevski
940c7dc5bc Support for GCP KMS configuration (#592) 2021-02-10 18:09:50 -08:00
Daniel Valdivia
cdadb05551 Move Tenant from Modal to Page (#596)
* Move Tenant from Modal to Page

* Address comments

* Small margin tweak
2021-02-10 15:41:07 -08:00
Daniel Valdivia
1dcdc61ce8 Fix Tenant Details Bugs (#589)
This fixes #584 by making the expand set a name for the pool
This fixes #585 by making the expand set an affinity for the pool
This fixes #586 by generating a pool name if it's not indicated only
2021-02-05 14:27:29 -08:00
Lenin Alevski
7174892231 New design for subscription page (#568)
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-02-05 12:49:31 -08:00
Minio Trusted
3262212bd0 update README.md to link the binaries 2021-02-04 23:49:56 -08:00
Alex
ee1a6718d7 Changed policy API to receive name param in query instead or URL (#591)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-02-04 15:57:10 -08:00
Lenin Alevski
1c6a29bc20 Support for adding ExternalCaCert secrets (#576) 2021-02-02 16:49:40 -08:00
Daniel Valdivia
6b02f472e6 Upgrade console to use operator v4.0.0 (#581)
* Upgrade console to use operator v4.0.0

* Use latest Operator
2021-02-01 12:13:51 -08:00
Harshavardhana
eddb6a810b update console deps (#582)
- github.com/minio/minio/pkg/licverifier
- github.com/minio/minio/pkg/madmin
- github.com/minio/operator/

Co-authored-by: Minio Trusted <trusted@minio.io>
2021-01-27 19:55:56 -08:00
Lenin Alevski
3b1449c029 Default TLS redirect if Console runs with HTTPS (#580)
TLS redirect default behavior is `TRUE` only if Console is running with
HTTPS
2021-01-26 20:08:21 -08:00
Harshavardhana
365778eecb fix: turn-off TLS redirects if configured (#574)
fixes #573
2021-01-25 23:15:34 -08:00
Alex
52fac7f542 Fixed some issues with dashboard (#570)
-Added padding to the bottom of dashboard

-Added calculations for linear chart tick interval

-Added default min width configurations to panels.

- Fixed crash on clean tenant

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-01-25 10:12:50 -08:00
Minio Trusted
5c96eb9e25 update to v0.5.2 2021-01-22 11:43:21 -08:00
Alex
cd5f5cb635 Updated project dependencies (#571)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-01-22 11:06:54 -08:00
Alex
e17a371744 Removed extra padding in logs container sections (#567) 2021-01-21 11:33:29 -06:00
Cesar N
4f72aa969b Add loading circle on health info UI (#566)
Also hides the result of health info since it is only valuable when it is downloaded
2021-01-20 15:14:17 -06:00
Minio Trusted
3a84cba801 docs: add TOC header 2021-01-19 23:52:08 -08:00
Minio Trusted
9df7b815e9 docs: add AGPLv3 badge 2021-01-19 23:43:21 -08:00
Alex
3617ff2aef Updated copyright year in all the files (#565)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2021-01-19 15:04:13 -08:00
Alex
e7f16b4899 Added support for custom structure in bar charts (#563)
Added support for custom structure in bar charts so we can customize bar order & label

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2021-01-19 12:18:53 -08:00
Harshavardhana
dbe456c1a9 docs: update some verbiage and wording (#564) 2021-01-19 10:39:20 -08:00
2227 changed files with 419876 additions and 55170 deletions

View File

@@ -1,52 +0,0 @@
name: "Code scanning - action"
on:
push:
pull_request:
schedule:
- cron: '0 19 * * 0'
jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -1,37 +0,0 @@
name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Test on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.15.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
make test
make crosscompile
make console

622
.github/workflows/jobs.yaml vendored Normal file
View File

@@ -0,0 +1,622 @@
name: Workflow
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:
lint-job:
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
no-warnings-and-make-assets:
name: "React Code Has No Warnings and then Make Assets"
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
- uses: actions/setup-node@v2
with:
node-version: '17'
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Check out operator as a nested repository
uses: actions/checkout@v2
with:
repository: minio/operator
path: operator
- uses: actions/cache@v2
name: Go Mod Cache
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
name: Yarn Cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./portal-ui/node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
- name: Install Dependencies
working-directory: ./portal-ui
continue-on-error: false
run: |
yarn install
- name: Check for Warnings in build output
working-directory: ./portal-ui
continue-on-error: false
run: |
./check-warnings.sh
compile-job:
name: Compiles on Go ${{ matrix.go-version }} and ${{ matrix.os }}
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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
cross-compile-1:
name: Cross compile
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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'"
cross-compile-2:
name: Cross compile 2
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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'"
cross-compile-3:
name: Cross compile 3
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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'"
cross-compile-4:
name: Cross compile 4
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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'"
cross-compile-5:
name: Cross compile 5
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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'"
test-pkg-on-go:
name: Test Pkg on Go ${{ matrix.go-version }} and ${{ matrix.os }}
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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
test-restapi-on-go:
name: Test Restapi on Go ${{ matrix.go-version }} and ${{ matrix.os }}
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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
integration-tests:
name: Integration Tests with Latest Distributed MinIO
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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
# To build minio image, we need to clone the repository first
- name: clone https://github.com/minio/minio
uses: actions/checkout@master
with:
# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
repository: minio/minio
# Relative path under $GITHUB_WORKSPACE to place the repository
# To have two repositories under the same test
path: 'minio_repository'
- name: Build on ${{ matrix.os }}
run: |
echo "The idea is to build minio image from downloaded repository";
cd $GITHUB_WORKSPACE/minio_repository;
echo "Get git version to build MinIO Image";
VERSION=`git rev-parse HEAD`;
echo $VERSION;
echo "Create minio image";
make docker VERSION=$VERSION;
echo "Jumping back to console repository to run the integration test"
cd $GITHUB_WORKSPACE;
echo "We are going to use the built image on test-integration";
VERSION="minio/minio:$VERSION";
echo $VERSION;
make test-integration MINIO_VERSION=$VERSION;
react-tests:
name: React Tests
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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
operator-tests:
name: Operator Tests
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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
- uses: actions/setup-node@v2
with:
node-version: '17'
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Check out operator as a nested repository
uses: actions/checkout@v2
with:
repository: minio/operator
path: operator
- uses: actions/cache@v2
name: Go Mod Cache
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
name: Yarn Cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./portal-ui/node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
- name: Build Console on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make console
# Runs a set of commands using the runners shell
- name: Start Kind for Operator UI
run: |
"${GITHUB_WORKSPACE}/portal-ui/tests/scripts/operator.sh"
- name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest
with:
args: '"chrome:headless" portal-ui/tests/operator/ --skip-js-errors -c 3'
permissions:
name: Permissions Tests
needs:
- lint-job
- no-warnings-and-make-assets
- coverage
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
- uses: actions/setup-node@v2
with:
node-version: '17'
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
name: Go Mod Cache
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
name: Yarn Cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./portal-ui/node_modules/
./portal-ui/build/
key: ${{ runner.os }}-yarn-${{ hashFiles('./portal-ui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: assets-cache
name: Assets Cache
with:
path: |
./portal-ui/build/
key: ${{ runner.os }}-assets-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-assets-
- name: Build Console on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
run: |
make console
- name: Start Console, front-end app and initialize users/policies
run: |
(./console server) & (make initialize-permissions)
- name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest
with:
args: '"chrome:headless" portal-ui/tests/permissions/ --skip-js-errors -c 3'
- name: Clean up users & policies
run: |
make cleanup-permissions
coverage:
name: "Coverage Limit Check"
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
- uses: actions/setup-node@v2
with:
node-version: '17'
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Check out gocovmerge as a nested repository
uses: actions/checkout@v2
with:
repository: wadey/gocovmerge
path: gocovmerge
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get coverage
run: |
cd restapi
go test -coverprofile=coverage.out
cd ../integration
go test -coverpkg=../restapi -c -tags testrunmain .
docker network create --subnet=173.18.0.0/29 mynet123
docker run -v /data1 -v /data2 -v /data3 -v /data4 --net=mynet123 -d --name minio --rm -p 9000:9000 "quay.io/minio/minio:latest" server /data{1...4}
docker run --net=mynet123 --ip=173.18.0.3 --name pgsqlcontainer --rm -p 5432:5432 -e POSTGRES_PASSWORD=password -d postgres
./integration.test -test.run "^Test*" -test.coverprofile=system.out
echo "change directory to gocovmerge"
cd ../gocovmerge
echo "download golang x tools"
go mod download golang.org/x/tools
echo "go mod tidy compat mode"
go mod tidy -compat=1.17
echo "go build gocoverage.go"
go build gocovmerge.go
echo "put together the outs for final coverage resolution"
./gocovmerge ../integration/system.out ../restapi/coverage.out > all.out
echo "grep to obtain the result"
go tool cover -func=all.out | grep total > tmp2
result=`cat tmp2 | awk 'END {print $3}'`
result=${result%\%}
echo "result:"
echo $result
threshold=40
if (( $(echo "$result > $threshold" |bc -l) )); then
echo "greater than threshold, passed!"
else
echo "smaller than threshold, failed!"
exit 1
fi

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

2
.gitignore vendored
View File

@@ -27,7 +27,6 @@ dist/
# Ignore node_modules
portal-ui/node_modules/
portal-ui/build/
# Ignore tls cert and key
private.key
@@ -37,3 +36,4 @@ public.crt
.vscode/
*.code-workspace
*~
.eslintcache

View File

@@ -12,17 +12,36 @@ linters:
- goimports
- misspell
- govet
- golint
- revive
- ineffassign
- gosimple
- deadcode
- unparam
- unused
- structcheck
- goheader
linters-settings:
goheader:
values:
regexp:
copyright-holder: Copyright \(c\) (20\d\d\-20\d\d)|2021|({{year}})
template-path: .license.tmpl
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
run:
skip-dirs:
- pkg/clientgen
- pkg/apis/networking.gke.io

View File

@@ -3,7 +3,7 @@
project_name: console
release:
name_template: "Release version {{.Version}}"
name_template: "Release version {{.Tag}}"
github:
owner: minio
name: console
@@ -13,7 +13,7 @@ release:
before:
hooks:
# you may remove this if you don't use vgo
- go mod tidy
- go mod tidy -compat=1.17
builds:
-
@@ -27,8 +27,6 @@ builds:
- s390x
- arm64
ignore:
- goos: darwin
goarch: arm64
- goos: darwin
goarch: arm
- goos: windows
@@ -43,7 +41,7 @@ builds:
flags:
- -trimpath
- --tags=kqueue
- --tags=kqueue,operator
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}}
@@ -72,53 +70,110 @@ changelog:
nfpms:
-
vendor: MinIO Inc.
vendor: MinIO, Inc.
homepage: https://github.com/minio/console
maintainer: MinIO <minio@minio.io>
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: true
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: true
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: true
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: true
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:
@@ -126,6 +181,12 @@ docker_manifests:
- 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

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/>.

16373
CREDITS

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@ Run the `billy.ldif` file using `ldapadd` command to create a new user and assig
```
$ docker cp console/docs/ldap/billy.ldif my-openldap-container:/container/service/slapd/assets/test/billy.ldif
$ 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 -ZZ
$ 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
@@ -67,7 +67,7 @@ $ cat > consoleAdmin.json << EOF
}
EOF
$ mc admin policy add myminio consoleAdmin consoleAdmin.json
$ mc admin policy set myminio consoleAdmin user=billy
$ mc admin policy set myminio consoleAdmin user="uid=billy,dc=example,dc=org"
```
## Run MinIO

View File

@@ -1,25 +1,18 @@
FROM golang:1.15 as binlayer
RUN go get github.com/go-bindata/go-bindata/... && go get github.com/elazarl/go-bindata-assetfs/...
FROM node:10 as uilayer
FROM node:17 as uilayer
WORKDIR /app
COPY --from=binlayer /go/bin/go-bindata-assetfs /bin/
COPY --from=binlayer /go/bin/go-bindata /bin/
COPY ./portal-ui/package.json ./
COPY ./portal-ui/yarn.lock ./
RUN yarn install
COPY ./portal-ui .
RUN yarn install && make build-static
RUN make build-static
USER node
FROM golang:1.15 as golayer
FROM golang:1.17 as golayer
RUN apt-get update -y && apt-get install -y ca-certificates
@@ -33,16 +26,16 @@ RUN go mod download
ADD . /go/src/github.com/minio/console/
WORKDIR /go/src/github.com/minio/console/
COPY --from=uilayer /app/bindata_assetfs.go /go/src/github.com/minio/console/portal-ui/bindata_assetfs.go
ENV CGO_ENABLED=0
RUN go build -ldflags "-w -s" -a -o console ./cmd/console
COPY --from=uilayer /app/build /go/src/github.com/minio/console/portal-ui/build
RUN go build --tags=kqueue,operator -ldflags "-w -s" -a -o console ./cmd/console
FROM scratch
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5
MAINTAINER MinIO Development "dev@min.io"
EXPOSE 9090
COPY --from=golayer /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=golayer /go/src/github.com/minio/console/console .

View File

@@ -1,14 +1,7 @@
FROM golang:1.15 as binlayer
RUN go get github.com/go-bindata/go-bindata/... && go get github.com/elazarl/go-bindata-assetfs/...
FROM node:10 as uilayer
FROM node:17 as uilayer
WORKDIR /app
COPY --from=binlayer /go/bin/go-bindata-assetfs /bin/
COPY --from=binlayer /go/bin/go-bindata /bin/
COPY ./portal-ui/package.json ./
COPY ./portal-ui/yarn.lock ./
RUN yarn install

View File

@@ -1,4 +1,6 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5
ARG TAG
COPY CREDITS /licenses/CREDITS
COPY LICENSE /licenses/LICENSE
@@ -6,8 +8,8 @@ COPY LICENSE /licenses/LICENSE
LABEL name="MinIO" \
vendor="MinIO Inc <dev@min.io>" \
maintainer="MinIO Inc <dev@min.io>" \
version="v0.5.1" \
release="v0.5.1" \
version="${TAG}" \
release="${TAG}" \
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."

View File

@@ -3,14 +3,15 @@ GOPATH := $(shell go env GOPATH)
# Sets the build version based on the output of the following command, if we are building for a tag, that's the build else it uses the current git branch as the build
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:$(VERSION)-dev"
TAG ?= "minio/console:$(BUILD_VERSION)-dev"
MINIO_VERSION ?= "quay.io/minio/minio:latest"
default: console
.PHONY: console
console:
@echo "Building Console binary to './console'"
@(GO111MODULE=on CGO_ENABLED=0 go build -trimpath --tags=kqueue --ldflags "-s -w" -o console ./cmd/console)
@(GO111MODULE=on CGO_ENABLED=0 go build -trimpath --tags=kqueue,operator --ldflags "-s -w" -o console ./cmd/console)
k8sdev:
@docker build -t $(TAG) --build-arg build_version=$(BUILD_VERSION) --build-arg build_time='$(BUILD_TIME)' .
@@ -19,7 +20,7 @@ k8sdev:
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.27.0)
@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.43.0)
verifiers: getdeps fmt lint
@@ -31,7 +32,7 @@ fmt:
@GO111MODULE=on gofmt -d cluster/
crosscompile:
@(env bash $(PWD)/cross-compile.sh)
@(env bash $(PWD)/cross-compile.sh $(arg1))
lint:
@echo "Running $@ check"
@@ -43,17 +44,65 @@ install: console
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/console $(GOPATH)/bin/console
@echo "Installation successful. To learn more, try \"console --help\"."
swagger-gen:
@echo "Generating swagger server code from yaml"
swagger-gen: clean-swagger swagger-console swagger-operator
@echo "Done Generating swagger server code from yaml"
clean-swagger:
@echo "cleaning"
@rm -rf models
@rm -rf restapi/operations
@swagger generate server -A console --main-package=console --exclude-main -P models.Principal -f ./swagger.yml -r NOTICE
@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-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 ..)
@(cd portal-ui; yarn install --prefer-offline; make build-static; yarn prettier --write . --loglevel warn; cd ..)
test-integration:
@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)
@(docker run -v /data1 -v /data2 -v /data3 -v /data4 --net=mynet123 -d --name minio --rm -p 9000:9000 $(MINIO_VERSION) server /data{1...4} && sleep 5)
@(docker run --net=mynet123 --ip=173.18.0.3 --name pgsqlcontainer --rm -p 5432:5432 -e POSTGRES_PASSWORD=password -d postgres && sleep 5)
@(GO111MODULE=on go test -race -v github.com/minio/console/integration/...)
@(docker stop minio)
test-operator:
@(env bash $(PWD)/portal-ui/tests/scripts/operator.sh)
@(docker stop minio)
test-permissions:
@(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)
@(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-operator:
@echo "Done initializing operator test"
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/...)
test-pkg:
@(GO111MODULE=on go test -race -v github.com/minio/console/pkg/...)
coverage:
@@ -66,4 +115,12 @@ clean:
@rm -vf console
docker:
@docker build -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)' .
release: swagger-gen
@echo "Generating Release: $(RELEASE)"
@make assets
@yq -i e '.spec.template.spec.containers[0].image |= "minio/console:$(RELEASE)"' k8s/operator-console/base/console-deployment.yaml
@yq -i e 'select(.kind == "Deployment").spec.template.spec.containers[0].image |= "minio/console:$(RELEASE)"' k8s/operator-console/standalone/console-deployment.yaml
@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) 2020 MinIO, Inc.
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

127
README.md
View File

@@ -1,28 +1,83 @@
# MinIO Console
![build](https://github.com/minio/console/workflows/Go/badge.svg) ![license](https://img.shields.io/badge/license-AGPL%20V3-blue)
A graphical user interface for [MinIO](https://github.com/minio/minio)
| Dashboard | Creating a bucket |
| ------------- | ------------- |
| ![Dashboard](images/pic1.png) | ![Dashboard](images/pic2.png) |
| Dashboard | Creating a bucket |
| ------------- | ------------- |
| ![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**
- [MinIO Console](#minio-console)
- [Install](#install)
- [Binary Releases](#binary-releases)
- [Docker](#docker)
- [Build from source](#build-from-source)
- [Setup](#setup)
- [1. Create a user `console` using `mc`](#1-create-a-user-console-using-mc)
- [2. Create a policy for `console` with admin access to all resources (for testing)](#2-create-a-policy-for-console-with-admin-access-to-all-resources-for-testing)
- [3. Set the policy for the new `console` user](#3-set-the-policy-for-the-new-console-user)
- [Start Console service:](#start-console-service)
- [Start Console service with TLS:](#start-console-service-with-tls)
- [Connect Console to a Minio using TLS and a self-signed certificate](#connect-console-to-a-minio-using-tls-and-a-self-signed-certificate)
- [Contribute to console Project](#contribute-to-console-project)
<!-- markdown-toc end -->
## Install
### Binary Releases
| 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) |
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
```
### 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
```
go install github.com/minio/console/cmd/console@latest
```
## Setup
All `console` needs is a MinIO user with admin privileges and URL pointing to your MinIO deployment.
> Note: We don't recommend using MinIO's Operator Credentials
1. Create a user for `console` using `mc`.
### 1. Create a user `console` using `mc`
```bash
$ set +o history
$ mc admin user add myminio console YOURCONSOLESECRET
$ set -o history
mc admin user add myminio/
Enter Access Key: console
Enter Secret Key: xxxxxxxx
```
2. Create a policy for `console` with access to everything (for testing and debugging)
### 2. Create a policy for `console` with admin access to all resources (for testing)
```json
$ cat > consoleAdmin.json << EOF
```sh
cat > admin.json << EOF
{
"Version": "2012-10-17",
"Statement": [{
@@ -45,18 +100,20 @@ $ cat > consoleAdmin.json << EOF
]
}
EOF
$ mc admin policy add myminio consoleAdmin consoleAdmin.json
```
3. Set the policy for the new `console` user
```
$ mc admin policy set myminio consoleAdmin user=console
```sh
mc admin policy add myminio/ consoleAdmin admin.json
```
### 3. Set the policy for the new `console` user
```sh
mc admin policy set 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 `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",
@@ -97,32 +154,42 @@ Additionally, you can create policies to limit the privileges for `console` user
}
```
## Run Console server
To run the server:
## Start Console service:
```bash
Before running console service, following environment settings must be supplied
```sh
# Salt to encrypt JWT payload
export CONSOLE_PBKDF_PASSPHRASE=SECRET
#required to encrypt jwet payload
# Required to encrypt JWT payload
export CONSOLE_PBKDF_SALT=SECRET
# MinIO endpoint
# MinIO Endpoint
export CONSOLE_MINIO_SERVER=http://localhost:9000
./console server
```
## Run Console with TLS enable
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
```
By default `console` runs on port `9090` this can be changed with `--port` of your choice.
## Start Console service with TLS:
Copy your `public.crt` and `private.key` to `~/.console/certs`, then:
```bash
```sh
./console server
2021-01-19 02:36:08.893735 I | 2021/01/19 02:36:08 server.go:129: Serving console at http://[::]:9090
2021-01-19 02:36:08.893735 I | 2021/01/19 02:36:08 server.go:129: Serving console at https://[::]:9443
```
Additionally, `Console` has support for multiple certificates, clients can request them using `SNI`. It expects the following structure:
For advanced users, `console` has support for multiple certificates to service clients through multiple domains.
```bash
Following tree structure is expected for supporting multiple domains:
```sh
certs/
├─ public.crt
@@ -140,13 +207,11 @@ Additionally, `Console` has support for multiple certificates, clients can reque
```
Therefore, we read all filenames in the cert directory and check
for each directory whether it contains a public.crt and private.key.
## Connect Console to a Minio using TLS and a self-signed certificate
Copy the MinIO `ca.crt` under `~/.console/certs/CAs`, then:
```
```sh
export CONSOLE_MINIO_SERVER=https://localhost:9000
./console server
```

View File

@@ -18,13 +18,13 @@ 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: daniel@min.io, cesar@min.io
- If you receive no response: dev@min.io
- Primary security coordinator: lenin@min.io
- Secondary coordinator: security@min.io
- If you receive no response: dev@min.io
### Disclosure Process
MinIO uses the following disclosure process:
MinIO Console uses the following disclosure process:
1. Once the security report is received one member of the security team tries to verify and reproduce
the issue and determines the impact it has.
@@ -33,8 +33,8 @@ MinIO uses the following disclosure process:
3. Code is audited to find any potential similar problems.
4. Fixes are prepared for the latest release.
5. On the date that the fixes are applied a security advisory will be published on https://blog.min.io.
Please inform us in your report email whether MinIO should mention your contribution w.r.t. fixing
the security issue. By default MinIO will **not** publish this information to protect your privacy.
Please inform us in your report email whether MinIO Console should mention your contribution w.r.t. fixing
the security issue. By default MinIO Console will **not** publish this information to protect your privacy.
This process can take some time, especially when coordination is required with maintainers of other projects.
Every effort will be made to handle the bug in as timely a manner as possible, however it's important that we

38
VULNERABILITY_REPORT.md Normal file
View File

@@ -0,0 +1,38 @@
## Vulnerability Management Policy
This document formally describes the process of addressing and managing a
reported vulnerability that has been found in the MinIO Console server code base,
any directly connected ecosystem component or a direct / indirect dependency
of the code base.
### Scope
The vulnerability management policy described in this document covers the
process of investigating, assessing and resolving a vulnerability report
opened by a MinIO Console employee or an external third party.
Therefore, it lists pre-conditions and actions that should be performed to
resolve and fix a reported vulnerability.
### Vulnerability Management Process
The vulnerability management process requires that the vulnerability report
contains the following information:
- The project / component that contains the reported vulnerability.
- A description of the vulnerability. In particular, the type of the
reported vulnerability and how it might be exploited. Alternatively,
a well-established vulnerability identifier, e.g. CVE number, can be
used instead.
Based on the description mentioned above, a MinIO Console engineer or security team
member investigates:
- Whether the reported vulnerability exists.
- The conditions that are required such that the vulnerability can be exploited.
- The steps required to fix the vulnerability.
In general, if the vulnerability exists in one of the MinIO Console code bases
itself - not in a code dependency - then MinIO Console will, if possible, fix
the vulnerability or implement reasonable countermeasures such that the
vulnerability cannot be exploited anymore.

View File

@@ -1,5 +1,5 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2020 MinIO, Inc.
// 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

View File

@@ -1,5 +1,5 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2020 MinIO, Inc.
// 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
@@ -26,7 +26,7 @@ import (
"strings"
"time"
"github.com/minio/minio/pkg/env"
"github.com/minio/pkg/env"
)
var (

View File

@@ -1,5 +1,5 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2020 MinIO, Inc.
// 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

View File

@@ -1,5 +1,5 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2020 MinIO, Inc.
// 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
@@ -47,7 +47,7 @@ func (c *HTTPClient) Post(url, contentType string, body io.Reader) (resp *http.R
return c.Client.Post(url, contentType, body)
}
// Do implements http.Client.Do()
// Do implement http.Client.Do()
func (c *HTTPClient) Do(req *http.Request) (*http.Response, error) {
return c.Client.Do(req)
}

View File

@@ -0,0 +1,83 @@
//go:build operator
// +build operator
// 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 (
"os"
"strconv"
"time"
"github.com/minio/cli"
"github.com/minio/console/restapi"
)
var appCmds = []cli.Command{
serverCmd,
updateCmd,
operatorCmd,
}
// 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

@@ -0,0 +1,77 @@
// 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/>.
//go:build !operator
// +build !operator
package main
import (
"strconv"
"time"
"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)
}
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

@@ -1,5 +1,5 @@
// This file is part of MinIO Console Server
// Copyright (c) 2020 MinIO, Inc.
// 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
@@ -23,39 +23,33 @@ import (
"sort"
"time"
"github.com/minio/console/pkg"
"github.com/minio/minio/pkg/console"
"github.com/minio/minio/pkg/trie"
"github.com/minio/minio/pkg/words"
"github.com/minio/cli"
"github.com/minio/console/pkg"
"github.com/minio/pkg/console"
"github.com/minio/pkg/trie"
"github.com/minio/pkg/words"
)
// 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,
}
func newApp(name string) *cli.App {
// Collection of console commands currently supported are.
var commands []cli.Command
@@ -106,7 +100,7 @@ func newApp(name string) *cli.App {
app.Author = "MinIO, Inc."
app.Usage = "MinIO Console Server"
app.Description = `MinIO Console Server`
app.Copyright = "(c) 2020 MinIO, Inc."
app.Copyright = "(c) 2021 MinIO, Inc."
app.Compiled, _ = time.Parse(time.RFC3339, pkg.ReleaseTime)
app.Commands = commands
app.HideHelpCommand = true // Hide `help, h` command, we already have `minio --help`.

229
cmd/console/operator.go Normal file
View File

@@ -0,0 +1,229 @@
//go:build operator
// +build operator
// 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()
return server.Serve()
}

View File

@@ -1,5 +1,5 @@
// This file is part of MinIO Console Server
// Copyright (c) 2020 MinIO, Inc.
// 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
@@ -18,9 +18,9 @@ package main
import (
"fmt"
"log"
"os"
"io/ioutil"
"path/filepath"
"syscall"
"github.com/go-openapi/loads"
"github.com/jessevdk/go-flags"
@@ -34,47 +34,73 @@ import (
var serverCmd = cli.Command{
Name: "server",
Aliases: []string{"srv"},
Usage: "starts Console server",
Action: startServer,
Usage: "Start MinIO Console server",
Action: StartServer,
Flags: []cli.Flag{
cli.StringFlag{
Name: "host",
Value: restapi.GetHostname(),
Usage: "HTTP server hostname",
Usage: "bind to a specific HOST, HOST can be an IP or hostname",
},
cli.IntFlag{
Name: "port",
Value: restapi.GetPort(),
Usage: "HTTP Server port",
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.GetTLSHostname(),
Usage: "HTTPS server hostname",
},
cli.IntFlag{
Name: "tls-port",
Value: restapi.GetTLSPort(),
Usage: "HTTPS server port",
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,
},
},
}
// starts the controller
func startServer(ctx *cli.Context) error {
func buildServer() (*restapi.Server, error) {
swaggerSpec, err := loads.Embedded(restapi.SwaggerJSON, restapi.FlatSwaggerJSON)
if err != nil {
log.Fatalln(err)
return nil, err
}
api := operations.NewConsoleAPI(swaggerSpec)
api.Logger = restapi.LogInfo
server := restapi.NewServer(api)
defer server.Shutdown()
parser := flags.NewParser(server, flags.Default)
parser.ShortDescription = "MinIO Console Server"
@@ -82,56 +108,71 @@ func startServer(ctx *cli.Context) error {
server.ConfigureFlags()
// register all APIs
server.ConfigureAPI()
for _, optsGroup := range api.CommandLineOptionsGroups {
_, err := parser.AddGroup(optsGroup.ShortDescription, optsGroup.LongDescription, optsGroup.Options)
if err != nil {
log.Fatalln(err)
return nil, err
}
}
if _, err := parser.Parse(); err != nil {
code := 1
if fe, ok := err.(*flags.Error); ok {
if fe.Type == flags.ErrHelp {
code = 0
return nil, err
}
return server, nil
}
func loadAllCerts(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
restapi.GlobalRootCAs, restapi.GlobalPublicCerts, restapi.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 = restapi.GlobalTLSCertsManager.AddCertificate(swaggerServerCertificate, swaggerServerCertificateKey); err != nil {
return err
}
x509Certs, err := certs.ParsePublicCertFile(swaggerServerCertificate)
if err == nil {
restapi.GlobalPublicCerts = append(restapi.GlobalPublicCerts, x509Certs...)
}
}
// load ca cert from swagger server tls-ca flag
if swaggerServerCACertificate != "" {
caCert, caCertErr := ioutil.ReadFile(swaggerServerCACertificate)
if caCertErr == nil {
restapi.GlobalRootCAs.AppendCertsFromPEM(caCert)
}
}
os.Exit(code)
}
server.Host = ctx.String("host")
server.Port = ctx.Int("port")
restapi.Hostname = ctx.String("host")
restapi.Port = fmt.Sprintf("%v", ctx.Int("port"))
// Set all certs and CAs directories path
certs.GlobalCertsDir, _ = certs.NewConfigDirFromCtx(ctx, "certs-dir", certs.DefaultCertsDir.Get)
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 {
log.Println(fmt.Sprintf("Unable to create certs CA directory at %s", certs.GlobalCertsCADir.Get()))
}
// load the certificates and the CAs
restapi.GlobalRootCAs, restapi.GlobalPublicCerts, restapi.GlobalTLSCertsManager = certs.GetAllCertificatesAndCAs()
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 = ctx.Int("tls-port")
server.TLSHost = ctx.String("tls-host")
// Need to store tls-port, tls-host un config variables so secure.middleware can read from there
restapi.TLSPort = fmt.Sprintf("%v", ctx.Int("tls-port"))
restapi.TLSHostname = ctx.String("tls-host")
restapi.TLSRedirect = "on"
if restapi.GlobalTLSCertsManager != nil {
restapi.GlobalTLSCertsManager.ReloadOnSignal(syscall.SIGHUP)
}
server.ConfigureAPI()
if err := server.Serve(); err != nil {
log.Fatalln(err)
}
return nil
}

154
cmd/console/update.go Normal file
View File

@@ -0,0 +1,154 @@
// 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 (
"encoding/json"
"errors"
"fmt"
"io"
"net"
"net/http"
"os"
"runtime"
"strings"
"time"
"github.com/blang/semver/v4"
"github.com/cheggaaa/pb/v3"
"github.com/minio/cli"
"github.com/minio/console/pkg"
"github.com/minio/selfupdate"
)
func getUpdateTransport(timeout time.Duration) http.RoundTripper {
var updateTransport http.RoundTripper = &http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: timeout,
KeepAlive: timeout,
DualStack: true,
}).DialContext,
IdleConnTimeout: timeout,
TLSHandshakeTimeout: timeout,
ExpectContinueTimeout: timeout,
DisableCompression: true,
}
return updateTransport
}
func getUpdateReaderFromURL(u string, transport http.RoundTripper) (io.ReadCloser, int64, error) {
clnt := &http.Client{
Transport: transport,
}
req, err := http.NewRequest(http.MethodGet, u, nil)
if err != nil {
return nil, -1, err
}
resp, err := clnt.Do(req)
if err != nil {
return nil, -1, err
}
return resp.Body, resp.ContentLength, nil
}
const defaultPubKey = "RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"
func getLatestRelease(tr http.RoundTripper) (string, error) {
releaseURL := "https://api.github.com/repos/minio/console/releases/latest"
body, _, err := getUpdateReaderFromURL(releaseURL, tr)
if err != nil {
return "", fmt.Errorf("unable to access github release URL %w", err)
}
defer body.Close()
lm := make(map[string]interface{})
if err = json.NewDecoder(body).Decode(&lm); err != nil {
return "", err
}
rel, ok := lm["tag_name"].(string)
if !ok {
return "", errors.New("unable to find latest release tag")
}
return rel, nil
}
// update console in-place
var updateCmd = cli.Command{
Name: "update",
Usage: "update console to latest release",
Action: updateInplace,
}
func updateInplace(ctx *cli.Context) error {
transport := getUpdateTransport(30 * time.Second)
rel, err := getLatestRelease(transport)
if err != nil {
return err
}
latest, err := semver.Make(strings.TrimPrefix(rel, "v"))
if err != nil {
return err
}
current, err := semver.Make(pkg.Version)
if err != nil {
return err
}
if current.GTE(latest) {
fmt.Printf("You are already running the latest version v%v.\n", pkg.Version)
return nil
}
consoleBin := fmt.Sprintf("https://github.com/minio/console/releases/download/%s/console-%s-%s", rel, runtime.GOOS, runtime.GOARCH)
reader, length, err := getUpdateReaderFromURL(consoleBin, transport)
if err != nil {
return fmt.Errorf("unable to fetch binary from %s: %w", consoleBin, err)
}
minisignPubkey := os.Getenv("CONSOLE_MINISIGN_PUBKEY")
if minisignPubkey == "" {
minisignPubkey = defaultPubKey
}
v := selfupdate.NewVerifier()
if err = v.LoadFromURL(consoleBin+".minisig", minisignPubkey, transport); err != nil {
return fmt.Errorf("unable to fetch binary signature for %s: %w", consoleBin, err)
}
opts := selfupdate.Options{
Verifier: v,
}
tmpl := `{{ red "Downloading:" }} {{bar . (red "[") (green "=") (red "]")}} {{speed . | rndcolor }}`
bar := pb.ProgressBarTemplate(tmpl).Start64(length)
barReader := bar.NewProxyReader(reader)
if err = selfupdate.Apply(barReader, opts); err != nil {
bar.Finish()
if rerr := selfupdate.RollbackError(err); rerr != nil {
return rerr
}
return err
}
bar.Finish()
fmt.Printf("Updated 'console' to latest release %s\n", rel)
return nil
}

View File

@@ -4,13 +4,12 @@ set -e
# Enable tracing if set.
[ -n "$BASH_XTRACEFD" ] && set -x
_init() {
## All binaries are static make sure to disable CGO.
export CGO_ENABLED=0
## All binaries are static make sure to disable CGO.
export CGO_ENABLED=0
## List of architectures and OS to test coss compilation.
SUPPORTED_OSARCH="linux/ppc64le linux/mips64 linux/arm64 linux/s390x darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64"
}
## List of architectures and OS to test cross compilation.
SUPPORTED_OSARCH_DEFAULTS="linux/ppc64le linux/mips64 linux/arm64 linux/s390x darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64"
SUPPORTED_OSARCH=${1:-$SUPPORTED_OSARCH_DEFAULTS}
_build() {
local osarch=$1
@@ -31,4 +30,4 @@ main() {
done
}
_init && main "$@"
main "$@"

177
go.mod
View File

@@ -1,38 +1,163 @@
module github.com/minio/console
go 1.15
go 1.17
require (
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/elazarl/go-bindata-assetfs v1.0.0
github.com/go-openapi/errors v0.19.6
github.com/go-openapi/loads v0.19.5
github.com/go-openapi/runtime v0.19.19
github.com/go-openapi/spec v0.19.8
github.com/go-openapi/strfmt v0.19.5
github.com/go-openapi/swag v0.19.9
github.com/go-openapi/validate v0.19.10
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.20.2
github.com/go-openapi/loads v0.21.0
github.com/go-openapi/runtime v0.21.1
github.com/go-openapi/spec v0.20.4
github.com/go-openapi/strfmt v0.21.1
github.com/go-openapi/swag v0.19.15
github.com/go-openapi/validate v0.20.3
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/kes v0.11.0
github.com/minio/mc v0.0.0-20201220181029-41c804b179de
github.com/minio/minio v0.0.0-20201221162327-6df6ac0f3410
github.com/minio/minio-go/v7 v7.0.7-0.20201217170524-3baf9ea06f7c
github.com/minio/operator v0.0.0-20201204220226-9901d1d0766c
github.com/minio/operator/logsearchapi v0.0.0-20201217190212-bf6546b09012
github.com/minio/madmin-go v1.3.4
github.com/minio/mc v0.0.0-20220204044644-e048c85d71a7
github.com/minio/minio-go/v7 v7.0.23
github.com/minio/operator v0.0.0-20220110040724-a5d59a342b7f
github.com/minio/pkg v1.1.16
github.com/minio/selfupdate v0.4.0
github.com/mitchellh/go-homedir v1.1.0
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
github.com/rs/xid v1.3.0
github.com/secure-io/sio-go v0.3.1
github.com/stretchr/testify v1.6.1
github.com/unrolled/secure v1.0.7
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
gopkg.in/yaml.v2 v2.3.0
k8s.io/api v0.18.6
k8s.io/apimachinery v0.18.8
k8s.io/client-go v0.18.6
github.com/stretchr/testify v1.7.0
github.com/tidwall/gjson v1.12.1
github.com/unrolled/secure v1.0.9
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
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
)
replace github.com/minio/operator v0.0.0-20201204220226-9901d1d0766c => github.com/dvaldivia/operator v0.0.0-20201230052356-04efc0ea5890
require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/VividCortex/ewma v1.1.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/charmbracelet/bubbles v0.10.0 // indirect
github.com/charmbracelet/bubbletea v0.19.3 // indirect
github.com/charmbracelet/lipgloss v0.4.1-0.20220204041308-bf2912e703f6 // indirect
github.com/cheggaaa/pb v1.0.29 // indirect
github.com/containerd/console v1.0.2 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/analysis v0.21.2 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/goccy/go-json v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gnostic v0.5.1 // 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/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/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.14 // indirect
github.com/lestrrat-go/option v1.0.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-colorable v0.1.12 // 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/minio/argon2 v1.0.0 // indirect
github.com/minio/colorjson v1.0.1 // 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/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.6.0 // indirect
github.com/pkg/xattr v0.4.4 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.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.12 // indirect
github.com/sirupsen/logrus v1.8.1 // 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
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.etcd.io/etcd/api/v3 v3.5.1 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.1 // indirect
go.etcd.io/etcd/client/v3 v3.5.1 // indirect
go.mongodb.org/mongo-driver v1.7.5 // 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/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // 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.7 // indirect
google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb // indirect
google.golang.org/grpc v1.43.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/h2non/filetype.v1 v1.0.5 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.3 // 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
)
replace google.golang.org/grpc => google.golang.org/grpc v1.29.1

1546
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
// This file is part of MinIO Console Server
// Copyright (c) 2020 MinIO, Inc.
// 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
@@ -13,9 +13,3 @@
//
// 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 acl
const (
consoleOperatorMode = "CONSOLE_OPERATOR_MODE"
)

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.9 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

@@ -0,0 +1,168 @@
// 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"
"log"
"net/http"
"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 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.3 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
assert := assert.New(t)
// Test
response, err := NotifyPostgres()
finalResponse := inspectHTTPResponse(response)
assert.Nil(err)
if err != nil {
log.Println(err)
assert.Fail(finalResponse)
return
}
if response != nil {
assert.Equal(200, response.StatusCode, finalResponse)
}
}
func TestRestartService(t *testing.T) {
assert := assert.New(t)
restartResponse, restartError := RestartService()
assert.Nil(restartError)
if restartError != nil {
log.Println(restartError)
return
}
addObjRsp := inspectHTTPResponse(restartResponse)
if restartResponse != nil {
assert.Equal(
204,
restartResponse.StatusCode,
addObjRsp,
)
}
}

193
integration/buckets_test.go Normal file
View File

@@ -0,0 +1,193 @@
// 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 integration
import (
"bytes"
b64 "encoding/base64"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"os"
"strconv"
"testing"
"time"
"github.com/go-openapi/loads"
"github.com/minio/console/restapi"
"github.com/minio/console/restapi/operations"
)
var token string
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
}
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 printMessage(message string) {
/*
Helper function to print HTTP response.
*/
fmt.Println(message)
}
func initConsoleServer() (*restapi.Server, error) {
//os.Setenv("CONSOLE_MINIO_SERVER", "localhost:9000")
swaggerSpec, err := loads.Embedded(restapi.SwaggerJSON, restapi.FlatSwaggerJSON)
if err != nil {
return nil, err
}
noLog := func(string, ...interface{}) {
// nothing to log
}
// Initialize MinIO loggers
restapi.LogInfo = noLog
restapi.LogError = noLog
api := operations.NewConsoleAPI(swaggerSpec)
api.Logger = noLog
server := restapi.NewServer(api)
// register all APIs
server.ConfigureAPI()
//restapi.GlobalRootCAs, restapi.GlobalPublicCerts, restapi.GlobalTLSCertsManager = globalRootCAs, globalPublicCerts, globalTLSCerts
consolePort, _ := strconv.Atoi("9090")
server.Host = "0.0.0.0"
server.Port = consolePort
restapi.Port = "9090"
restapi.Hostname = "0.0.0.0"
return server, nil
}
func TestMain(m *testing.M) {
// start console server
go func() {
fmt.Println("start server")
srv, err := initConsoleServer()
if err != nil {
log.Println(err)
log.Println("init fail")
return
}
srv.Serve()
}()
fmt.Println("sleeping")
time.Sleep(2 * time.Second)
client := &http.Client{
Timeout: 2 * time.Second,
}
// get login credentials
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)
if err != nil {
log.Println(err)
return
}
if response != nil {
for _, cookie := range response.Cookies() {
if cookie.Name == "token" {
token = cookie.Value
break
}
}
}
if token == "" {
log.Println("authentication token not found in cookies response")
return
}
code := m.Run()
requestDataAdd := map[string]interface{}{
"name": "test1",
}
requestDataJSON, _ = json.Marshal(requestDataAdd)
requestDataBody = bytes.NewReader(requestDataJSON)
// get list of buckets
request, err = http.NewRequest("DELETE", "http://localhost:9090/api/v1/buckets/test1", 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)
}
os.Exit(code)
}

71
integration/login_test.go Normal file
View File

@@ -0,0 +1,71 @@
// 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 integration
import (
"encoding/json"
"io/ioutil"
"log"
"net/http"
"testing"
"time"
"github.com/minio/console/models"
"github.com/stretchr/testify/assert"
)
func TestLoginStrategy(t *testing.T) {
assert := assert.New(t)
// image for now:
// minio: 9000
// console: 9090
client := &http.Client{
Timeout: 2 * time.Second,
}
// copy query params
request, err := http.NewRequest("GET", "http://localhost:9090/api/v1/login", nil)
if err != nil {
log.Println(err)
return
}
response, err := client.Do(request)
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
if response != nil {
bodyBytes, _ := ioutil.ReadAll(response.Body)
loginDetails := models.LoginDetails{}
err = json.Unmarshal(bodyBytes, &loginDetails)
if err != nil {
log.Println(err)
}
assert.Nil(err)
assert.Equal(models.LoginDetailsLoginStrategyForm, loginDetails.LoginStrategy, "Login Details don't match")
}
}

View File

@@ -0,0 +1,198 @@
// 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"
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
fmt.Println(".......................TestServiceAccountPolicy(): Create Data to add user")
requestDataAddServiceAccount := map[string]interface{}{
"accessKey": "testuser1",
"secretKey": "password",
}
fmt.Println("..............................TestServiceAccountPolicy(): Prepare the POST")
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")
fmt.Println(".................................TestServiceAccountPolicy(): Make the POST")
response, err := client.Do(request)
if err != nil {
log.Println(err)
return
}
fmt.Println("..................................TestServiceAccountPolicy(): Verification")
fmt.Println(".................................TestServiceAccountPolicy(): POST response")
fmt.Println(response)
fmt.Println("....................................TestServiceAccountPolicy(): POST error")
fmt.Println(err)
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:::*"
]
}
]
}`,
}
fmt.Println("..............................TestServiceAccountPolicy(): Prepare the PUT")
requestDataJSON, _ = json.Marshal(requestDataPolicy)
requestDataBody = bytes.NewReader(requestDataJSON)
request, err = http.NewRequest(
"PUT", "http://localhost:9090/api/v1/service-accounts/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")
fmt.Println(".................................TestServiceAccountPolicy(): Make the PUT")
response, err = client.Do(request)
if err != nil {
log.Println(err)
return
}
fmt.Println("..................................TestServiceAccountPolicy(): Verification")
fmt.Println(".................................TestServiceAccountPolicy(): PUT response")
fmt.Println(response)
fmt.Println("....................................TestServiceAccountPolicy(): PUT error")
fmt.Println(err)
if response != nil {
fmt.Println("POST StatusCode:", response.StatusCode)
assert.Equal(200, response.StatusCode, "Status Code is incorrect")
}
fmt.Println("...................................TestServiceAccountPolicy(): Check policy")
// Test policy
fmt.Println(".......................TestAddUserServiceAccount(): Create Data to add user")
request, err = http.NewRequest(
"GET", "http://localhost:9090/api/v1/service-accounts/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")
fmt.Println(".................................TestAddServiceAccount(): Make the POST")
response, err = client.Do(request)
if err != nil {
log.Println(err)
return
}
fmt.Println("..................................TestAddServiceAccount(): Verification")
fmt.Println(".................................TestAddServiceAccount(): POST response")
fmt.Println(response)
fmt.Println("....................................TestAddServiceAccount(): POST error")
fmt.Println(err)
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)
}
fmt.Println("...................................TestServiceAccountPolicy(): Remove service account")
// {{baseUrl}}/user?name=proident velit
// Investiga como se borra en el browser.
request, err = http.NewRequest(
"DELETE", "http://localhost:9090/api/v1/service-accounts/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")
fmt.Println("...............................TestServiceAccountPolicy(): Make the DELETE")
response, err = client.Do(request)
if err != nil {
log.Println(err)
return
}
fmt.Println("..................................TestServiceAccountPolicy(): Verification")
fmt.Println("...............................TestServiceAccountPolicy(): DELETE response")
fmt.Println(response)
fmt.Println("..................................TestServiceAccountPolicy(): DELETE error")
fmt.Println(err)
if response != nil {
fmt.Println("DELETE StatusCode:", response.StatusCode)
assert.Equal(204, response.StatusCode, "has to be 204 when delete user")
}
}

File diff suppressed because it is too large Load Diff

974
integration/users_test.go Normal file
View File

@@ -0,0 +1,974 @@
// 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"
"io"
"log"
"net/http"
"strconv"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func AddUser(accessKey string, secretKey string, groups []string, 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,
}
fmt.Println(".......................TestAddUser(): Create Data to add user")
requestDataAdd := map[string]interface{}{
"accessKey": accessKey,
"secretKey": secretKey,
"groups": groups,
"policies": policies,
}
fmt.Println("..............................TestAddUser(): Prepare the POST")
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")
fmt.Println(".................................TestAddUser(): Make the POST")
response, err := client.Do(request)
return response, err
}
func DeleteUser(userName string) (*http.Response, error) {
/*
This is an atomic function to delete user and can be reused across
different functions.
*/
client := &http.Client{
Timeout: 3 * time.Second,
}
fmt.Println("...................................TestAddUser(): Remove user")
request, err := http.NewRequest(
"DELETE", "http://localhost:9090/api/v1/user?name="+userName, nil)
if err != nil {
log.Println(err)
}
request.Header.Add("Cookie", fmt.Sprintf("token=%s", token))
request.Header.Add("Content-Type", "application/json")
fmt.Println("...............................TestAddUser(): Make the DELETE")
response, err := client.Do(request)
return response, err
}
func ListUsers(offset string, 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,
}
fmt.Println("...................................TestAddUser(): Remove user")
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")
fmt.Println("...............................TestAddUser(): Make the DELETE")
response, err := client.Do(request)
return response, err
}
func GetUserInformation(userName string) (*http.Response, error) {
/*
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?name="+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 string, status string, groups []string) (*http.Response, error) {
/*
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="+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) {
/*
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="+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) {
/*
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/groups?name="+userName,
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 string, policy string) (*http.Response, error) {
/*
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 string, policy string, accessKey string, secretKey string) (*http.Response, error) {
// 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) {
/*
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 []string, 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
var groups = []string{}
var policies = []string{}
fmt.Println(".................................TestAddUser(): Make the POST")
response, err := AddUser("accessKey", "secretKey", groups, policies)
if err != nil {
log.Println(err)
return
}
fmt.Println("..................................TestAddUser(): Verification")
fmt.Println(".................................TestAddUser(): POST response")
fmt.Println(response)
fmt.Println("....................................TestAddUser(): POST error")
fmt.Println(err)
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
}
fmt.Println("..................................TestAddUser(): Verification")
fmt.Println("...............................TestAddUser(): DELETE response")
fmt.Println(response)
fmt.Println("..................................TestAddUser(): DELETE error")
fmt.Println(err)
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
var groups = []string{}
var policies = []string{}
// 1. Create the users
numberOfUsers := 5
for i := 1; i < numberOfUsers; i++ {
fmt.Println("............................TestListUsers(): Adding users")
fmt.Println(strconv.Itoa(i) + "accessKey" + strconv.Itoa(i))
response, err := AddUser(
strconv.Itoa(i)+"accessKey"+strconv.Itoa(i),
"secretKey"+strconv.Itoa(i), groups, policies)
if err != nil {
log.Println(err)
return
}
fmt.Println("............................TestListUsers(): Verification")
fmt.Println("...........................TestListUsers(): POST response")
fmt.Println(response)
fmt.Println("..............................TestListUsers(): POST error")
fmt.Println(err)
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
}
fmt.Println("............................TestListUsers(): Verification")
fmt.Println(".........................TestListUsers(): DELETE response")
fmt.Println(response)
fmt.Println("............................TestListUsers(): DELETE error")
fmt.Println(err)
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)
var groups = []string{}
var 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
var groups = []string{}
var 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
var groups = []string{}
var 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
var groups = []string{}
var 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)
printMessage(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)
var groups = []string{}
var 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
var 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
var groups = []string{}
var 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)
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 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
var groups = []string{}
var policies = []string{}
var 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)
})
}
}
func TestUsersGroupsBulk(t *testing.T) {
/*
To test UsersGroupsBulk End Point
*/
// Vars
assert := assert.New(t)
numberOfUsers := 5
numberOfGroups := 1
//var groups = []string{}
var policies = []string{}
username := "testusersgroupbulk"
groupName := "testusersgroupsbulkgroupone"
var 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(string(finalResponse), groupName))
}
}

View File

@@ -1,5 +1,5 @@
// This file is part of MinIO Console Server
// Copyright (c) 2020 MinIO, Inc.
// 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

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,88 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: console-sa-role
rules:
- apiGroups:
- ""
resources:
- namespaces
- pods
- services
- events
- resourcequotas
verbs:
- get
- watch
- create
- list
- patch
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- watch
- create
- list
- patch
- deletecollection
- delete
- 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:
- "*"

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,26 +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.5.1
imagePullPolicy: "IfNotPresent"
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,11 +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
- https://github.com/minio/operator/?ref=v3.0.10

View File

@@ -19,7 +19,6 @@ rules:
- ""
resources:
- namespaces
- pods
- services
- events
- resourcequotas
@@ -30,6 +29,18 @@ rules:
- create
- list
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- watch
- create
- list
- patch
- delete
- deletecollection
- apiGroups:
- ""
resources:
@@ -38,6 +49,8 @@ rules:
- deletecollection
- list
- get
- watch
- update
- apiGroups:
- "storage.k8s.io"
resources:
@@ -95,3 +108,127 @@ rules:
- "*"
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

@@ -15,7 +15,7 @@ spec:
serviceAccountName: console-sa
containers:
- name: console
image: minio/console:v0.5.1
image: 'minio/console:v0.15.0'
imagePullPolicy: "IfNotPresent"
env:
- name: CONSOLE_OPERATOR_MODE

View File

@@ -1,9 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# beginning of customizations
#namespace: min-ns
resources:
- ../base
- https://github.com/minio/operator/?ref=v3.0.29

View File

@@ -0,0 +1,46 @@
---
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.15.0'
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,5 +1,5 @@
// This file is part of MinIO Kubernetes Cloud
// Copyright (c) 2020 MinIO, Inc.
// 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
@@ -14,7 +14,7 @@
// 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/>.
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
// 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"
// import _ "k8s.io/code-generator"

70
models/access_rule.go Normal file
View File

@@ -0,0 +1,70 @@
// 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/strfmt"
"github.com/go-openapi/swag"
)
// AccessRule access rule
//
// swagger:model accessRule
type AccessRule struct {
// access
Access string `json:"access,omitempty"`
// prefix
Prefix string `json:"prefix,omitempty"`
}
// Validate validates this access rule
func (m *AccessRule) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this access rule based on context it is used
func (m *AccessRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AccessRule) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AccessRule) UnmarshalBinary(b []byte) error {
var res AccessRule
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
@@ -79,6 +81,11 @@ func (m *AccountChangePasswordRequest) validateNewSecretKey(formats strfmt.Regis
return nil
}
// ContextValidate validates this account change password request based on context it is used
func (m *AccountChangePasswordRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AccountChangePasswordRequest) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@@ -0,0 +1,152 @@
// 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"
"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
//
// swagger:model addBucketLifecycle
type AddBucketLifecycle struct {
// Non required, toggle to disable or enable rule
Disable bool `json:"disable,omitempty"`
// 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)
// 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
}
// ContextValidate validates this add bucket lifecycle based on context it is used
func (m *AddBucketLifecycle) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AddBucketLifecycle) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AddBucketLifecycle) UnmarshalBinary(b []byte) error {
var res AddBucketLifecycle
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
)
@@ -44,6 +46,11 @@ func (m *AddBucketReplication) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this add bucket replication based on context it is used
func (m *AddBucketReplication) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AddBucketReplication) MarshalBinary() ([]byte, error) {
if m == 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
@@ -79,6 +81,11 @@ func (m *AddGroupRequest) validateMembers(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this add group request based on context it is used
func (m *AddGroupRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AddGroupRequest) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@@ -0,0 +1,168 @@
// 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"
"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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
@@ -79,6 +81,11 @@ func (m *AddPolicyRequest) validatePolicy(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this add policy request based on context it is used
func (m *AddPolicyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AddPolicyRequest) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@@ -0,0 +1,88 @@
// 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"
)
// 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
@@ -42,6 +44,10 @@ type AddUserRequest struct {
// Required: true
Groups []string `json:"groups"`
// policies
// Required: true
Policies []string `json:"policies"`
// secret key
// Required: true
SecretKey *string `json:"secretKey"`
@@ -59,6 +65,10 @@ func (m *AddUserRequest) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validatePolicies(formats); err != nil {
res = append(res, err)
}
if err := m.validateSecretKey(formats); err != nil {
res = append(res, err)
}
@@ -87,6 +97,15 @@ func (m *AddUserRequest) validateGroups(formats strfmt.Registry) error {
return nil
}
func (m *AddUserRequest) validatePolicies(formats strfmt.Registry) error {
if err := validate.Required("policies", "body", m.Policies); err != nil {
return err
}
return nil
}
func (m *AddUserRequest) validateSecretKey(formats strfmt.Registry) error {
if err := validate.Required("secretKey", "body", m.SecretKey); err != nil {
@@ -96,6 +115,11 @@ func (m *AddUserRequest) validateSecretKey(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this add user request based on context it is used
func (m *AddUserRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AddUserRequest) MarshalBinary() ([]byte, error) {
if m == 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,7 @@ package models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@@ -41,6 +42,12 @@ type AdminInfoResponse struct {
// objects
Objects int64 `json:"objects,omitempty"`
// prometheus not ready
PrometheusNotReady bool `json:"prometheusNotReady,omitempty"`
// servers
Servers []*ServerProperties `json:"servers"`
// usage
Usage int64 `json:"usage,omitempty"`
@@ -52,6 +59,10 @@ type AdminInfoResponse struct {
func (m *AdminInfoResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateServers(formats); err != nil {
res = append(res, err)
}
if err := m.validateWidgets(formats); err != nil {
res = append(res, err)
}
@@ -62,8 +73,33 @@ func (m *AdminInfoResponse) Validate(formats strfmt.Registry) error {
return nil
}
func (m *AdminInfoResponse) validateWidgets(formats strfmt.Registry) error {
func (m *AdminInfoResponse) validateServers(formats strfmt.Registry) error {
if swag.IsZero(m.Servers) { // not required
return nil
}
for i := 0; i < len(m.Servers); i++ {
if swag.IsZero(m.Servers[i]) { // not required
continue
}
if m.Servers[i] != nil {
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
}
}
}
return nil
}
func (m *AdminInfoResponse) validateWidgets(formats strfmt.Registry) error {
if swag.IsZero(m.Widgets) { // not required
return nil
}
@@ -77,6 +113,66 @@ 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
}
}
}
return nil
}
// ContextValidate validate this admin info response based on the context it is used
func (m *AdminInfoResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateServers(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateWidgets(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AdminInfoResponse) contextValidateServers(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Servers); i++ {
if m.Servers[i] != nil {
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
}
}
}
return nil
}
func (m *AdminInfoResponse) contextValidateWidgets(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Widgets); i++ {
if m.Widgets[i] != nil {
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

@@ -0,0 +1,173 @@
// 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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.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
}

70
models/annotation.go Normal file
View File

@@ -0,0 +1,70 @@
// 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/strfmt"
"github.com/go-openapi/swag"
)
// Annotation annotation
//
// swagger:model annotation
type Annotation struct {
// key
Key string `json:"key,omitempty"`
// value
Value string `json:"value,omitempty"`
}
// Validate validates this annotation
func (m *Annotation) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this annotation based on context it is used
func (m *Annotation) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Annotation) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Annotation) UnmarshalBinary(b []byte) error {
var res Annotation
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
)
@@ -41,6 +43,11 @@ func (m *ArnsResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this arns response based on context it is used
func (m *ArnsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ArnsResponse) MarshalBinary() ([]byte, error) {
if m == 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
@@ -63,6 +65,38 @@ func (m *AwsConfiguration) validateSecretsmanager(formats strfmt.Registry) error
if err := m.Secretsmanager.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("secretsmanager")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("secretsmanager")
}
return err
}
@@ -142,6 +176,8 @@ func (m *AwsConfigurationSecretsmanager) validateCredentials(formats strfmt.Regi
if err := m.Credentials.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("secretsmanager" + "." + "credentials")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("secretsmanager" + "." + "credentials")
}
return err
}
@@ -168,6 +204,36 @@ func (m *AwsConfigurationSecretsmanager) validateRegion(formats strfmt.Registry)
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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("secretsmanager" + "." + "credentials")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *AwsConfigurationSecretsmanager) MarshalBinary() ([]byte, error) {
if m == nil {
@@ -239,6 +305,11 @@ func (m *AwsConfigurationSecretsmanagerCredentials) validateSecretkey(formats st
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 {

View File

@@ -0,0 +1,321 @@
// 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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.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")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.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

@@ -1,7 +1,7 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,9 @@ package models
// 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"
@@ -35,16 +38,28 @@ import (
type Bucket struct {
// access
Access BucketAccess `json:"access,omitempty"`
Access *BucketAccess `json:"access,omitempty"`
// creation date
CreationDate string `json:"creation_date,omitempty"`
// definition
Definition string `json:"definition,omitempty"`
// details
Details *BucketDetails `json:"details,omitempty"`
// name
// Required: true
// Min Length: 3
Name *string `json:"name"`
// objects
Objects int64 `json:"objects,omitempty"`
// rw access
RwAccess *BucketRwAccess `json:"rw_access,omitempty"`
// size
Size int64 `json:"size,omitempty"`
}
@@ -57,10 +72,18 @@ func (m *Bucket) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateDetails(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if err := m.validateRwAccess(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -68,16 +91,38 @@ func (m *Bucket) Validate(formats strfmt.Registry) error {
}
func (m *Bucket) validateAccess(formats strfmt.Registry) error {
if swag.IsZero(m.Access) { // not required
return nil
}
if err := m.Access.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("access")
if m.Access != nil {
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
}
}
return nil
}
func (m *Bucket) validateDetails(formats strfmt.Registry) error {
if swag.IsZero(m.Details) { // not required
return nil
}
if m.Details != nil {
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
}
return err
}
return nil
@@ -89,13 +134,102 @@ func (m *Bucket) validateName(formats strfmt.Registry) error {
return err
}
if err := validate.MinLength("name", "body", string(*m.Name), 3); err != nil {
if err := validate.MinLength("name", "body", *m.Name, 3); err != nil {
return err
}
return nil
}
func (m *Bucket) validateRwAccess(formats strfmt.Registry) error {
if swag.IsZero(m.RwAccess) { // not required
return nil
}
if m.RwAccess != nil {
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
}
}
return nil
}
// ContextValidate validate this bucket based on the context it is used
func (m *Bucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAccess(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateDetails(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateRwAccess(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Bucket) contextValidateAccess(ctx context.Context, formats strfmt.Registry) error {
if m.Access != nil {
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
}
}
return nil
}
func (m *Bucket) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error {
if m.Details != nil {
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
}
}
return nil
}
func (m *Bucket) contextValidateRwAccess(ctx context.Context, formats strfmt.Registry) error {
if m.RwAccess != nil {
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
}
}
return nil
}
// MarshalBinary interface implementation
func (m *Bucket) MarshalBinary() ([]byte, error) {
if m == nil {
@@ -113,3 +247,237 @@ func (m *Bucket) UnmarshalBinary(b []byte) error {
*m = res
return nil
}
// BucketDetails bucket details
//
// swagger:model BucketDetails
type BucketDetails struct {
// locking
Locking bool `json:"locking,omitempty"`
// quota
Quota *BucketDetailsQuota `json:"quota,omitempty"`
// replication
Replication bool `json:"replication,omitempty"`
// tags
Tags map[string]string `json:"tags,omitempty"`
// versioning
Versioning bool `json:"versioning,omitempty"`
// versioning suspended
VersioningSuspended bool `json:"versioningSuspended,omitempty"`
}
// Validate validates this bucket details
func (m *BucketDetails) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateQuota(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BucketDetails) validateQuota(formats strfmt.Registry) error {
if swag.IsZero(m.Quota) { // not required
return nil
}
if m.Quota != nil {
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
}
}
return nil
}
// ContextValidate validate this bucket details based on the context it is used
func (m *BucketDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateQuota(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BucketDetails) contextValidateQuota(ctx context.Context, formats strfmt.Registry) error {
if m.Quota != nil {
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
}
}
return nil
}
// MarshalBinary interface implementation
func (m *BucketDetails) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *BucketDetails) UnmarshalBinary(b []byte) error {
var res BucketDetails
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// BucketDetailsQuota bucket details quota
//
// swagger:model BucketDetailsQuota
type BucketDetailsQuota struct {
// quota
Quota int64 `json:"quota,omitempty"`
// type
// Enum: [hard]
Type string `json:"type,omitempty"`
}
// Validate validates this bucket details quota
func (m *BucketDetailsQuota) 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 bucketDetailsQuotaTypeTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["hard"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
bucketDetailsQuotaTypeTypePropEnum = append(bucketDetailsQuotaTypeTypePropEnum, v)
}
}
const (
// BucketDetailsQuotaTypeHard captures enum value "hard"
BucketDetailsQuotaTypeHard string = "hard"
)
// prop value enum
func (m *BucketDetailsQuota) validateTypeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, bucketDetailsQuotaTypeTypePropEnum, true); err != nil {
return err
}
return nil
}
func (m *BucketDetailsQuota) validateType(formats strfmt.Registry) error {
if swag.IsZero(m.Type) { // not required
return nil
}
// value enum
if err := m.validateTypeEnum("details"+"."+"quota"+"."+"type", "body", m.Type); err != nil {
return err
}
return nil
}
// ContextValidate validates this bucket details quota based on context it is used
func (m *BucketDetailsQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BucketDetailsQuota) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *BucketDetailsQuota) UnmarshalBinary(b []byte) error {
var res BucketDetailsQuota
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// BucketRwAccess bucket rw access
//
// swagger:model BucketRwAccess
type BucketRwAccess struct {
// read
Read bool `json:"read,omitempty"`
// write
Write bool `json:"write,omitempty"`
}
// Validate validates this bucket rw access
func (m *BucketRwAccess) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this bucket rw access based on context it is used
func (m *BucketRwAccess) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BucketRwAccess) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *BucketRwAccess) UnmarshalBinary(b []byte) error {
var res BucketRwAccess
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,7 @@ package models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"encoding/json"
"github.com/go-openapi/errors"
@@ -35,6 +36,15 @@ import (
// swagger:model bucketAccess
type BucketAccess string
func NewBucketAccess(value BucketAccess) *BucketAccess {
return &value
}
// Pointer returns a pointer to a freshly-allocated BucketAccess.
func (m BucketAccess) Pointer() *BucketAccess {
return &m
}
const (
// BucketAccessPRIVATE captures enum value "PRIVATE"
@@ -81,3 +91,8 @@ func (m BucketAccess) Validate(formats strfmt.Registry) error {
}
return nil
}
// ContextValidate validates this bucket access based on context it is used
func (m BucketAccess) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
)
@@ -44,6 +46,11 @@ func (m *BucketEncryptionInfo) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this bucket encryption info based on context it is used
func (m *BucketEncryptionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BucketEncryptionInfo) MarshalBinary() ([]byte, error) {
if m == 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
@@ -34,7 +36,7 @@ import (
type BucketEncryptionRequest struct {
// enc type
EncType BucketEncryptionType `json:"encType,omitempty"`
EncType *BucketEncryptionType `json:"encType,omitempty"`
// kms key ID
KmsKeyID string `json:"kmsKeyID,omitempty"`
@@ -55,16 +57,49 @@ func (m *BucketEncryptionRequest) Validate(formats strfmt.Registry) error {
}
func (m *BucketEncryptionRequest) validateEncType(formats strfmt.Registry) error {
if swag.IsZero(m.EncType) { // not required
return nil
}
if err := m.EncType.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("encType")
if m.EncType != nil {
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
}
}
return nil
}
// ContextValidate validate this bucket encryption request based on the context it is used
func (m *BucketEncryptionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEncType(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BucketEncryptionRequest) contextValidateEncType(ctx context.Context, formats strfmt.Registry) error {
if m.EncType != nil {
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
}
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,7 @@ package models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"encoding/json"
"github.com/go-openapi/errors"
@@ -35,13 +36,22 @@ import (
// swagger:model bucketEncryptionType
type BucketEncryptionType string
func NewBucketEncryptionType(value BucketEncryptionType) *BucketEncryptionType {
return &value
}
// Pointer returns a pointer to a freshly-allocated BucketEncryptionType.
func (m BucketEncryptionType) Pointer() *BucketEncryptionType {
return &m
}
const (
// BucketEncryptionTypeSseS3 captures enum value "sse-s3"
BucketEncryptionTypeSseS3 BucketEncryptionType = "sse-s3"
// BucketEncryptionTypeSseDashS3 captures enum value "sse-s3"
BucketEncryptionTypeSseDashS3 BucketEncryptionType = "sse-s3"
// BucketEncryptionTypeSseKms captures enum value "sse-kms"
BucketEncryptionTypeSseKms BucketEncryptionType = "sse-kms"
// BucketEncryptionTypeSseDashKms captures enum value "sse-kms"
BucketEncryptionTypeSseDashKms BucketEncryptionType = "sse-kms"
)
// for schema
@@ -78,3 +88,8 @@ func (m BucketEncryptionType) Validate(formats strfmt.Registry) error {
}
return nil
}
// ContextValidate validates this bucket encryption type based on context it is used
func (m BucketEncryptionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
@@ -66,6 +68,38 @@ 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
}
}
return nil
}
// ContextValidate validate this bucket event request based on the context it is used
func (m *BucketEventRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateConfiguration(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BucketEventRequest) contextValidateConfiguration(ctx context.Context, formats strfmt.Registry) error {
if m.Configuration != nil {
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
}

View File

@@ -0,0 +1,133 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// BucketLifecycleResponse bucket lifecycle response
//
// swagger:model bucketLifecycleResponse
type BucketLifecycleResponse struct {
// lifecycle
Lifecycle []*ObjectBucketLifecycle `json:"lifecycle"`
}
// Validate validates this bucket lifecycle response
func (m *BucketLifecycleResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateLifecycle(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BucketLifecycleResponse) validateLifecycle(formats strfmt.Registry) error {
if swag.IsZero(m.Lifecycle) { // not required
return nil
}
for i := 0; i < len(m.Lifecycle); i++ {
if swag.IsZero(m.Lifecycle[i]) { // not required
continue
}
if m.Lifecycle[i] != nil {
if err := m.Lifecycle[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("lifecycle" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("lifecycle" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this bucket lifecycle response based on the context it is used
func (m *BucketLifecycleResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateLifecycle(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BucketLifecycleResponse) contextValidateLifecycle(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Lifecycle); i++ {
if m.Lifecycle[i] != nil {
if err := m.Lifecycle[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("lifecycle" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("lifecycle" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *BucketLifecycleResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *BucketLifecycleResponse) UnmarshalBinary(b []byte) error {
var res BucketLifecycleResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,67 @@
// 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/strfmt"
"github.com/go-openapi/swag"
)
// BucketObLockingResponse bucket ob locking response
//
// swagger:model bucketObLockingResponse
type BucketObLockingResponse struct {
// object locking enabled
ObjectLockingEnabled bool `json:"object_locking_enabled,omitempty"`
}
// Validate validates this bucket ob locking response
func (m *BucketObLockingResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this bucket ob locking response based on context it is used
func (m *BucketObLockingResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BucketObLockingResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *BucketObLockingResponse) UnmarshalBinary(b []byte) error {
var res BucketObLockingResponse
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
)
@@ -35,6 +37,9 @@ type BucketObject struct {
// content type
ContentType string `json:"content_type,omitempty"`
// etag
Etag string `json:"etag,omitempty"`
// expiration
Expiration string `json:"expiration,omitempty"`
@@ -53,6 +58,9 @@ type BucketObject struct {
// legal hold status
LegalHoldStatus string `json:"legal_hold_status,omitempty"`
// metadata
Metadata map[string]string `json:"metadata,omitempty"`
// name
Name string `json:"name,omitempty"`
@@ -68,6 +76,9 @@ type BucketObject struct {
// tags
Tags map[string]string `json:"tags,omitempty"`
// user metadata
UserMetadata map[string]string `json:"user_metadata,omitempty"`
// user tags
UserTags map[string]string `json:"user_tags,omitempty"`
@@ -80,6 +91,11 @@ func (m *BucketObject) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this bucket object based on context it is used
func (m *BucketObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BucketObject) MarshalBinary() ([]byte, error) {
if m == nil {

122
models/bucket_quota.go Normal file
View File

@@ -0,0 +1,122 @@
// 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"
"encoding/json"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// BucketQuota bucket quota
//
// swagger:model bucketQuota
type BucketQuota struct {
// quota
Quota int64 `json:"quota,omitempty"`
// type
// Enum: [hard]
Type string `json:"type,omitempty"`
}
// Validate validates this bucket quota
func (m *BucketQuota) 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 bucketQuotaTypeTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["hard"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
bucketQuotaTypeTypePropEnum = append(bucketQuotaTypeTypePropEnum, v)
}
}
const (
// BucketQuotaTypeHard captures enum value "hard"
BucketQuotaTypeHard string = "hard"
)
// prop value enum
func (m *BucketQuota) validateTypeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, bucketQuotaTypeTypePropEnum, true); err != nil {
return err
}
return nil
}
func (m *BucketQuota) 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
}
// ContextValidate validates this bucket quota based on context it is used
func (m *BucketQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BucketQuota) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *BucketQuota) UnmarshalBinary(b []byte) error {
var res BucketQuota
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
)
@@ -41,6 +43,11 @@ func (m *BucketReplicationDestination) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this bucket replication destination based on context it is used
func (m *BucketReplicationDestination) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BucketReplicationDestination) MarshalBinary() ([]byte, error) {
if m == 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,7 @@ package models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@@ -54,7 +55,6 @@ func (m *BucketReplicationResponse) Validate(formats strfmt.Registry) error {
}
func (m *BucketReplicationResponse) validateRules(formats strfmt.Registry) error {
if swag.IsZero(m.Rules) { // not required
return nil
}
@@ -68,6 +68,42 @@ func (m *BucketReplicationResponse) validateRules(formats strfmt.Registry) error
if err := m.Rules[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rules" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("rules" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this bucket replication response based on the context it is used
func (m *BucketReplicationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateRules(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BucketReplicationResponse) contextValidateRules(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Rules); i++ {
if m.Rules[i] != nil {
if err := m.Rules[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rules" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("rules" + "." + strconv.Itoa(i))
}
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,7 @@ package models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"encoding/json"
"github.com/go-openapi/errors"
@@ -36,31 +37,55 @@ import (
// swagger:model bucketReplicationRule
type BucketReplicationRule struct {
// bandwidth
Bandwidth string `json:"bandwidth,omitempty"`
// delete marker replication
DeleteMarkerReplication *BucketReplicationRuleMarker `json:"delete_marker_replication,omitempty"`
DeleteMarkerReplication bool `json:"delete_marker_replication,omitempty"`
// deletes replication
DeletesReplication bool `json:"deletes_replication,omitempty"`
// destination
Destination *BucketReplicationDestination `json:"destination,omitempty"`
// existing objects
ExistingObjects bool `json:"existingObjects,omitempty"`
// health check period
HealthCheckPeriod int64 `json:"healthCheckPeriod,omitempty"`
// id
ID string `json:"id,omitempty"`
// metadata replication
MetadataReplication bool `json:"metadata_replication,omitempty"`
// prefix
Prefix string `json:"prefix,omitempty"`
// priority
Priority int32 `json:"priority,omitempty"`
// status
// Enum: [Enabled Disabled]
Status string `json:"status,omitempty"`
// storage class
StorageClass string `json:"storageClass,omitempty"`
// sync mode
// Enum: [async sync]
SyncMode *string `json:"syncMode,omitempty"`
// tags
Tags string `json:"tags,omitempty"`
}
// Validate validates this bucket replication rule
func (m *BucketReplicationRule) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDeleteMarkerReplication(formats); err != nil {
res = append(res, err)
}
if err := m.validateDestination(formats); err != nil {
res = append(res, err)
}
@@ -69,32 +94,17 @@ func (m *BucketReplicationRule) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateSyncMode(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BucketReplicationRule) validateDeleteMarkerReplication(formats strfmt.Registry) error {
if swag.IsZero(m.DeleteMarkerReplication) { // not required
return nil
}
if m.DeleteMarkerReplication != nil {
if err := m.DeleteMarkerReplication.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("delete_marker_replication")
}
return err
}
}
return nil
}
func (m *BucketReplicationRule) validateDestination(formats strfmt.Registry) error {
if swag.IsZero(m.Destination) { // not required
return nil
}
@@ -103,6 +113,8 @@ func (m *BucketReplicationRule) validateDestination(formats strfmt.Registry) err
if err := m.Destination.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("destination")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("destination")
}
return err
}
@@ -141,7 +153,6 @@ func (m *BucketReplicationRule) validateStatusEnum(path, location string, value
}
func (m *BucketReplicationRule) validateStatus(formats strfmt.Registry) error {
if swag.IsZero(m.Status) { // not required
return nil
}
@@ -154,6 +165,78 @@ func (m *BucketReplicationRule) validateStatus(formats strfmt.Registry) error {
return nil
}
var bucketReplicationRuleTypeSyncModePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["async","sync"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
bucketReplicationRuleTypeSyncModePropEnum = append(bucketReplicationRuleTypeSyncModePropEnum, v)
}
}
const (
// BucketReplicationRuleSyncModeAsync captures enum value "async"
BucketReplicationRuleSyncModeAsync string = "async"
// BucketReplicationRuleSyncModeSync captures enum value "sync"
BucketReplicationRuleSyncModeSync string = "sync"
)
// prop value enum
func (m *BucketReplicationRule) validateSyncModeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, bucketReplicationRuleTypeSyncModePropEnum, true); err != nil {
return err
}
return nil
}
func (m *BucketReplicationRule) validateSyncMode(formats strfmt.Registry) error {
if swag.IsZero(m.SyncMode) { // not required
return nil
}
// value enum
if err := m.validateSyncModeEnum("syncMode", "body", *m.SyncMode); err != nil {
return err
}
return nil
}
// ContextValidate validate this bucket replication rule based on the context it is used
func (m *BucketReplicationRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateDestination(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *BucketReplicationRule) contextValidateDestination(ctx context.Context, formats strfmt.Registry) error {
if m.Destination != nil {
if err := m.Destination.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("destination")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("destination")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *BucketReplicationRule) MarshalBinary() ([]byte, error) {
if m == 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
)
@@ -41,6 +43,11 @@ func (m *BucketVersioningResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this bucket versioning response based on context it is used
func (m *BucketVersioningResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BucketVersioningResponse) MarshalBinary() ([]byte, error) {
if m == 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
@@ -79,6 +81,11 @@ func (m *BulkUserGroups) validateUsers(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this bulk user groups based on context it is used
func (m *BulkUserGroups) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BulkUserGroups) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@@ -0,0 +1,76 @@
// 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/strfmt"
"github.com/go-openapi/swag"
)
// CertificateInfo certificate info
//
// swagger:model certificateInfo
type CertificateInfo struct {
// domains
Domains []string `json:"domains"`
// expiry
Expiry string `json:"expiry,omitempty"`
// name
Name string `json:"name,omitempty"`
// serial number
SerialNumber string `json:"serialNumber,omitempty"`
}
// Validate validates this certificate info
func (m *CertificateInfo) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this certificate info based on context it is used
func (m *CertificateInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CertificateInfo) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CertificateInfo) UnmarshalBinary(b []byte) error {
var res CertificateInfo
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,105 @@
// 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"
)
// ChangeUserPasswordRequest change user password request
//
// swagger:model changeUserPasswordRequest
type ChangeUserPasswordRequest struct {
// new secret key
// Required: true
NewSecretKey *string `json:"newSecretKey"`
// selected user
// Required: true
SelectedUser *string `json:"selectedUser"`
}
// Validate validates this change user password request
func (m *ChangeUserPasswordRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateNewSecretKey(formats); err != nil {
res = append(res, err)
}
if err := m.validateSelectedUser(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ChangeUserPasswordRequest) validateNewSecretKey(formats strfmt.Registry) error {
if err := validate.Required("newSecretKey", "body", m.NewSecretKey); err != nil {
return err
}
return nil
}
func (m *ChangeUserPasswordRequest) validateSelectedUser(formats strfmt.Registry) error {
if err := validate.Required("selectedUser", "body", m.SelectedUser); err != nil {
return err
}
return nil
}
// ContextValidate validates this change user password request based on context it is used
func (m *ChangeUserPasswordRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ChangeUserPasswordRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ChangeUserPasswordRequest) UnmarshalBinary(b []byte) error {
var res ChangeUserPasswordRequest
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
)
@@ -44,6 +46,11 @@ func (m *ConfigDescription) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this config description based on context it is used
func (m *ConfigDescription) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ConfigDescription) MarshalBinary() ([]byte, error) {
if m == 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,7 @@ package models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@@ -57,7 +58,6 @@ func (m *Configuration) Validate(formats strfmt.Registry) error {
}
func (m *Configuration) validateKeyValues(formats strfmt.Registry) error {
if swag.IsZero(m.KeyValues) { // not required
return nil
}
@@ -71,6 +71,42 @@ func (m *Configuration) validateKeyValues(formats strfmt.Registry) error {
if err := m.KeyValues[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("key_values" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("key_values" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this configuration based on the context it is used
func (m *Configuration) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateKeyValues(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Configuration) contextValidateKeyValues(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.KeyValues); i++ {
if m.KeyValues[i] != nil {
if err := m.KeyValues[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("key_values" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("key_values" + "." + strconv.Itoa(i))
}
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
)
@@ -44,6 +46,11 @@ func (m *ConfigurationKV) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this configuration k v based on context it is used
func (m *ConfigurationKV) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ConfigurationKV) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@@ -0,0 +1,67 @@
// 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/strfmt"
"github.com/go-openapi/swag"
)
// ConfigureTenantRequest configure tenant request
//
// swagger:model configureTenantRequest
type ConfigureTenantRequest struct {
// prometheus enabled
PrometheusEnabled bool `json:"prometheusEnabled,omitempty"`
}
// Validate validates this configure tenant request
func (m *ConfigureTenantRequest) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this configure tenant request based on context it is used
func (m *ConfigureTenantRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ConfigureTenantRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ConfigureTenantRequest) UnmarshalBinary(b []byte) error {
var res ConfigureTenantRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -1,117 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2020 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 (
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// ConsoleConfiguration console configuration
//
// swagger:model consoleConfiguration
type ConsoleConfiguration struct {
MetadataFields
// image
Image string `json:"image,omitempty"`
}
// UnmarshalJSON unmarshals this object from a JSON structure
func (m *ConsoleConfiguration) UnmarshalJSON(raw []byte) error {
// AO0
var aO0 MetadataFields
if err := swag.ReadJSON(raw, &aO0); err != nil {
return err
}
m.MetadataFields = aO0
// AO1
var dataAO1 struct {
Image string `json:"image,omitempty"`
}
if err := swag.ReadJSON(raw, &dataAO1); err != nil {
return err
}
m.Image = dataAO1.Image
return nil
}
// MarshalJSON marshals this object to a JSON structure
func (m ConsoleConfiguration) MarshalJSON() ([]byte, error) {
_parts := make([][]byte, 0, 2)
aO0, err := swag.WriteJSON(m.MetadataFields)
if err != nil {
return nil, err
}
_parts = append(_parts, aO0)
var dataAO1 struct {
Image string `json:"image,omitempty"`
}
dataAO1.Image = m.Image
jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1)
if errAO1 != nil {
return nil, errAO1
}
_parts = append(_parts, jsonDataAO1)
return swag.ConcatJSON(_parts...), nil
}
// Validate validates this console configuration
func (m *ConsoleConfiguration) Validate(formats strfmt.Registry) error {
var res []error
// validation for a type composition with MetadataFields
if err := m.MetadataFields.Validate(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// MarshalBinary interface implementation
func (m *ConsoleConfiguration) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ConsoleConfiguration) UnmarshalBinary(b []byte) error {
var res ConsoleConfiguration
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,9 @@ package models
// 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"
@@ -39,6 +42,12 @@ type CreateRemoteBucket struct {
// Min Length: 3
AccessKey *string `json:"accessKey"`
// bandwidth
Bandwidth int64 `json:"bandwidth,omitempty"`
// health check period
HealthCheckPeriod int32 `json:"healthCheckPeriod,omitempty"`
// region
Region string `json:"region,omitempty"`
@@ -51,6 +60,10 @@ type CreateRemoteBucket struct {
// Required: true
SourceBucket *string `json:"sourceBucket"`
// sync mode
// Enum: [async sync]
SyncMode *string `json:"syncMode,omitempty"`
// target bucket
// Required: true
TargetBucket *string `json:"targetBucket"`
@@ -76,6 +89,10 @@ func (m *CreateRemoteBucket) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateSyncMode(formats); err != nil {
res = append(res, err)
}
if err := m.validateTargetBucket(formats); err != nil {
res = append(res, err)
}
@@ -96,7 +113,7 @@ func (m *CreateRemoteBucket) validateAccessKey(formats strfmt.Registry) error {
return err
}
if err := validate.MinLength("accessKey", "body", string(*m.AccessKey), 3); err != nil {
if err := validate.MinLength("accessKey", "body", *m.AccessKey, 3); err != nil {
return err
}
@@ -109,7 +126,7 @@ func (m *CreateRemoteBucket) validateSecretKey(formats strfmt.Registry) error {
return err
}
if err := validate.MinLength("secretKey", "body", string(*m.SecretKey), 8); err != nil {
if err := validate.MinLength("secretKey", "body", *m.SecretKey, 8); err != nil {
return err
}
@@ -125,6 +142,48 @@ func (m *CreateRemoteBucket) validateSourceBucket(formats strfmt.Registry) error
return nil
}
var createRemoteBucketTypeSyncModePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["async","sync"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
createRemoteBucketTypeSyncModePropEnum = append(createRemoteBucketTypeSyncModePropEnum, v)
}
}
const (
// CreateRemoteBucketSyncModeAsync captures enum value "async"
CreateRemoteBucketSyncModeAsync string = "async"
// CreateRemoteBucketSyncModeSync captures enum value "sync"
CreateRemoteBucketSyncModeSync string = "sync"
)
// prop value enum
func (m *CreateRemoteBucket) validateSyncModeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, createRemoteBucketTypeSyncModePropEnum, true); err != nil {
return err
}
return nil
}
func (m *CreateRemoteBucket) validateSyncMode(formats strfmt.Registry) error {
if swag.IsZero(m.SyncMode) { // not required
return nil
}
// value enum
if err := m.validateSyncModeEnum("syncMode", "body", *m.SyncMode); err != nil {
return err
}
return nil
}
func (m *CreateRemoteBucket) validateTargetBucket(formats strfmt.Registry) error {
if err := validate.Required("targetBucket", "body", m.TargetBucket); err != nil {
@@ -143,6 +202,11 @@ func (m *CreateRemoteBucket) validateTargetURL(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this create remote bucket based on context it is used
func (m *CreateRemoteBucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CreateRemoteBucket) MarshalBinary() ([]byte, error) {
if m == 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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,7 @@ package models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@@ -42,12 +43,6 @@ type CreateTenantRequest struct {
// annotations
Annotations map[string]string `json:"annotations,omitempty"`
// console
Console *ConsoleConfiguration `json:"console,omitempty"`
// console image
ConsoleImage string `json:"console_image,omitempty"`
// enable console
EnableConsole *bool `json:"enable_console,omitempty"`
@@ -84,6 +79,9 @@ type CreateTenantRequest struct {
// labels
Labels map[string]string `json:"labels,omitempty"`
// log search configuration
LogSearchConfiguration *LogSearchConfiguration `json:"logSearchConfiguration,omitempty"`
// mounth path
MounthPath string `json:"mounth_path,omitempty"`
@@ -100,6 +98,9 @@ type CreateTenantRequest struct {
// Required: true
Pools []*Pool `json:"pools"`
// prometheus configuration
PrometheusConfiguration *PrometheusConfiguration `json:"prometheusConfiguration,omitempty"`
// secret key
SecretKey string `json:"secret_key,omitempty"`
@@ -111,10 +112,6 @@ type CreateTenantRequest struct {
func (m *CreateTenantRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateConsole(formats); err != nil {
res = append(res, err)
}
if err := m.validateEncryption(formats); err != nil {
res = append(res, err)
}
@@ -127,6 +124,10 @@ func (m *CreateTenantRequest) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateLogSearchConfiguration(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
@@ -139,6 +140,10 @@ func (m *CreateTenantRequest) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validatePrometheusConfiguration(formats); err != nil {
res = append(res, err)
}
if err := m.validateTLS(formats); err != nil {
res = append(res, err)
}
@@ -149,26 +154,7 @@ func (m *CreateTenantRequest) Validate(formats strfmt.Registry) error {
return nil
}
func (m *CreateTenantRequest) validateConsole(formats strfmt.Registry) error {
if swag.IsZero(m.Console) { // not required
return nil
}
if m.Console != nil {
if err := m.Console.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("console")
}
return err
}
}
return nil
}
func (m *CreateTenantRequest) validateEncryption(formats strfmt.Registry) error {
if swag.IsZero(m.Encryption) { // not required
return nil
}
@@ -177,6 +163,8 @@ func (m *CreateTenantRequest) validateEncryption(formats strfmt.Registry) error
if err := m.Encryption.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("encryption")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("encryption")
}
return err
}
@@ -186,7 +174,6 @@ func (m *CreateTenantRequest) validateEncryption(formats strfmt.Registry) error
}
func (m *CreateTenantRequest) validateIdp(formats strfmt.Registry) error {
if swag.IsZero(m.Idp) { // not required
return nil
}
@@ -195,6 +182,8 @@ func (m *CreateTenantRequest) validateIdp(formats strfmt.Registry) error {
if err := m.Idp.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("idp")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("idp")
}
return err
}
@@ -204,7 +193,6 @@ func (m *CreateTenantRequest) validateIdp(formats strfmt.Registry) error {
}
func (m *CreateTenantRequest) validateImageRegistry(formats strfmt.Registry) error {
if swag.IsZero(m.ImageRegistry) { // not required
return nil
}
@@ -213,6 +201,27 @@ func (m *CreateTenantRequest) validateImageRegistry(formats strfmt.Registry) err
if err := m.ImageRegistry.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("image_registry")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("image_registry")
}
return err
}
}
return nil
}
func (m *CreateTenantRequest) validateLogSearchConfiguration(formats strfmt.Registry) error {
if swag.IsZero(m.LogSearchConfiguration) { // not required
return nil
}
if m.LogSearchConfiguration != nil {
if err := m.LogSearchConfiguration.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("logSearchConfiguration")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("logSearchConfiguration")
}
return err
}
@@ -227,7 +236,7 @@ func (m *CreateTenantRequest) validateName(formats strfmt.Registry) error {
return err
}
if err := validate.Pattern("name", "body", string(*m.Name), `^[a-z0-9-]{3,63}$`); err != nil {
if err := validate.Pattern("name", "body", *m.Name, `^[a-z0-9-]{3,63}$`); err != nil {
return err
}
@@ -258,6 +267,8 @@ func (m *CreateTenantRequest) validatePools(formats strfmt.Registry) error {
if err := m.Pools[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("pools" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("pools" + "." + strconv.Itoa(i))
}
return err
}
@@ -268,8 +279,26 @@ func (m *CreateTenantRequest) validatePools(formats strfmt.Registry) error {
return nil
}
func (m *CreateTenantRequest) validateTLS(formats strfmt.Registry) error {
func (m *CreateTenantRequest) validatePrometheusConfiguration(formats strfmt.Registry) error {
if swag.IsZero(m.PrometheusConfiguration) { // not required
return nil
}
if m.PrometheusConfiguration != nil {
if err := m.PrometheusConfiguration.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("prometheusConfiguration")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("prometheusConfiguration")
}
return err
}
}
return nil
}
func (m *CreateTenantRequest) validateTLS(formats strfmt.Registry) error {
if swag.IsZero(m.TLS) { // not required
return nil
}
@@ -278,6 +307,162 @@ func (m *CreateTenantRequest) validateTLS(formats strfmt.Registry) error {
if err := m.TLS.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls")
}
return err
}
}
return nil
}
// ContextValidate validate this create tenant request based on the context it is used
func (m *CreateTenantRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEncryption(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateIdp(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateImageRegistry(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateLogSearchConfiguration(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidatePools(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidatePrometheusConfiguration(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateTLS(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CreateTenantRequest) contextValidateEncryption(ctx context.Context, formats strfmt.Registry) error {
if m.Encryption != nil {
if err := m.Encryption.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("encryption")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("encryption")
}
return err
}
}
return nil
}
func (m *CreateTenantRequest) contextValidateIdp(ctx context.Context, formats strfmt.Registry) error {
if m.Idp != nil {
if err := m.Idp.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("idp")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("idp")
}
return err
}
}
return nil
}
func (m *CreateTenantRequest) contextValidateImageRegistry(ctx context.Context, formats strfmt.Registry) error {
if m.ImageRegistry != nil {
if err := m.ImageRegistry.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("image_registry")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("image_registry")
}
return err
}
}
return nil
}
func (m *CreateTenantRequest) contextValidateLogSearchConfiguration(ctx context.Context, formats strfmt.Registry) error {
if m.LogSearchConfiguration != nil {
if err := m.LogSearchConfiguration.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("logSearchConfiguration")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("logSearchConfiguration")
}
return err
}
}
return nil
}
func (m *CreateTenantRequest) contextValidatePools(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Pools); i++ {
if m.Pools[i] != nil {
if err := m.Pools[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("pools" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("pools" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CreateTenantRequest) contextValidatePrometheusConfiguration(ctx context.Context, formats strfmt.Registry) error {
if m.PrometheusConfiguration != nil {
if err := m.PrometheusConfiguration.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("prometheusConfiguration")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("prometheusConfiguration")
}
return err
}
}
return nil
}
func (m *CreateTenantRequest) contextValidateTLS(ctx context.Context, formats strfmt.Registry) error {
if m.TLS != nil {
if err := m.TLS.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls")
}
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,9 @@ package models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
@@ -34,7 +37,10 @@ import (
type CreateTenantResponse struct {
// console
Console *CreateTenantResponseConsole `json:"console,omitempty"`
Console []*TenantResponseItem `json:"console"`
// external ID p
ExternalIDP bool `json:"externalIDP,omitempty"`
}
// Validate validates this create tenant response
@@ -52,18 +58,60 @@ func (m *CreateTenantResponse) Validate(formats strfmt.Registry) error {
}
func (m *CreateTenantResponse) validateConsole(formats strfmt.Registry) error {
if swag.IsZero(m.Console) { // not required
return nil
}
if m.Console != nil {
if err := m.Console.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("console")
}
return err
for i := 0; i < len(m.Console); i++ {
if swag.IsZero(m.Console[i]) { // not required
continue
}
if m.Console[i] != nil {
if err := m.Console[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("console" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("console" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this create tenant response based on the context it is used
func (m *CreateTenantResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateConsole(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CreateTenantResponse) contextValidateConsole(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Console); i++ {
if m.Console[i] != nil {
if err := m.Console[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("console" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("console" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
@@ -86,38 +134,3 @@ func (m *CreateTenantResponse) UnmarshalBinary(b []byte) error {
*m = res
return nil
}
// CreateTenantResponseConsole create tenant response console
//
// swagger:model CreateTenantResponseConsole
type CreateTenantResponseConsole struct {
// access key
AccessKey string `json:"access_key,omitempty"`
// secret key
SecretKey string `json:"secret_key,omitempty"`
}
// Validate validates this create tenant response console
func (m *CreateTenantResponseConsole) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CreateTenantResponseConsole) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CreateTenantResponseConsole) UnmarshalBinary(b []byte) error {
var res CreateTenantResponseConsole
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,73 @@
// 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/strfmt"
"github.com/go-openapi/swag"
)
// CsiFormatErrorResponse csi format error response
//
// swagger:model csiFormatErrorResponse
type CsiFormatErrorResponse struct {
// drive
Drive string `json:"drive,omitempty"`
// error
Error string `json:"error,omitempty"`
// node
Node string `json:"node,omitempty"`
}
// Validate validates this csi format error response
func (m *CsiFormatErrorResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this csi format error response based on context it is used
func (m *CsiFormatErrorResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CsiFormatErrorResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CsiFormatErrorResponse) UnmarshalBinary(b []byte) error {
var res CsiFormatErrorResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

73
models/delete_file.go Normal file
View File

@@ -0,0 +1,73 @@
// 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/strfmt"
"github.com/go-openapi/swag"
)
// DeleteFile delete file
//
// swagger:model deleteFile
type DeleteFile struct {
// path
Path string `json:"path,omitempty"`
// recursive
Recursive bool `json:"recursive,omitempty"`
// version ID
VersionID string `json:"versionID,omitempty"`
}
// Validate validates this delete file
func (m *DeleteFile) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this delete file based on context it is used
func (m *DeleteFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *DeleteFile) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *DeleteFile) UnmarshalBinary(b []byte) error {
var res DeleteFile
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
)
@@ -41,6 +43,11 @@ func (m *DeleteTenantRequest) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this delete tenant request based on context it is used
func (m *DeleteTenantRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *DeleteTenantRequest) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@@ -0,0 +1,85 @@
// 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/strfmt"
"github.com/go-openapi/swag"
)
// DirectCSIDriveInfo direct c s i drive info
//
// swagger:model directCSIDriveInfo
type DirectCSIDriveInfo struct {
// allocated
Allocated int64 `json:"allocated,omitempty"`
// capacity
Capacity int64 `json:"capacity,omitempty"`
// drive
Drive string `json:"drive,omitempty"`
// message
Message string `json:"message,omitempty"`
// node
Node string `json:"node,omitempty"`
// status
Status string `json:"status,omitempty"`
// volumes
Volumes int64 `json:"volumes,omitempty"`
}
// Validate validates this direct c s i drive info
func (m *DirectCSIDriveInfo) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this direct c s i drive info based on context it is used
func (m *DirectCSIDriveInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *DirectCSIDriveInfo) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *DirectCSIDriveInfo) UnmarshalBinary(b []byte) error {
var res DirectCSIDriveInfo
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,76 @@
// 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/strfmt"
"github.com/go-openapi/swag"
)
// DirectCSIVolumeInfo direct c s i volume info
//
// swagger:model directCSIVolumeInfo
type DirectCSIVolumeInfo struct {
// capacity
Capacity int64 `json:"capacity,omitempty"`
// drive
Drive string `json:"drive,omitempty"`
// node
Node string `json:"node,omitempty"`
// volume
Volume string `json:"volume,omitempty"`
}
// Validate validates this direct c s i volume info
func (m *DirectCSIVolumeInfo) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this direct c s i volume info based on context it is used
func (m *DirectCSIVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *DirectCSIVolumeInfo) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *DirectCSIVolumeInfo) UnmarshalBinary(b []byte) error {
var res DirectCSIVolumeInfo
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) 2020 MinIO, Inc.
// 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
@@ -23,6 +23,8 @@ package models
// 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"
@@ -37,15 +39,30 @@ type EncryptionConfiguration struct {
// aws
Aws *AwsConfiguration `json:"aws,omitempty"`
// azure
Azure *AzureConfiguration `json:"azure,omitempty"`
// client
Client *KeyPairConfiguration `json:"client,omitempty"`
// gcp
Gcp *GcpConfiguration `json:"gcp,omitempty"`
// gemalto
Gemalto *GemaltoConfiguration `json:"gemalto,omitempty"`
// image
Image string `json:"image,omitempty"`
// replicas
Replicas string `json:"replicas,omitempty"`
// secrets to be deleted
SecretsToBeDeleted []string `json:"secretsToBeDeleted"`
// security context
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
// server
Server *KeyPairConfiguration `json:"server,omitempty"`
@@ -66,12 +83,22 @@ func (m *EncryptionConfiguration) UnmarshalJSON(raw []byte) error {
var dataAO1 struct {
Aws *AwsConfiguration `json:"aws,omitempty"`
Azure *AzureConfiguration `json:"azure,omitempty"`
Client *KeyPairConfiguration `json:"client,omitempty"`
Gcp *GcpConfiguration `json:"gcp,omitempty"`
Gemalto *GemaltoConfiguration `json:"gemalto,omitempty"`
Image string `json:"image,omitempty"`
Replicas string `json:"replicas,omitempty"`
SecretsToBeDeleted []string `json:"secretsToBeDeleted"`
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
Server *KeyPairConfiguration `json:"server,omitempty"`
Vault *VaultConfiguration `json:"vault,omitempty"`
@@ -82,12 +109,22 @@ func (m *EncryptionConfiguration) UnmarshalJSON(raw []byte) error {
m.Aws = dataAO1.Aws
m.Azure = dataAO1.Azure
m.Client = dataAO1.Client
m.Gcp = dataAO1.Gcp
m.Gemalto = dataAO1.Gemalto
m.Image = dataAO1.Image
m.Replicas = dataAO1.Replicas
m.SecretsToBeDeleted = dataAO1.SecretsToBeDeleted
m.SecurityContext = dataAO1.SecurityContext
m.Server = dataAO1.Server
m.Vault = dataAO1.Vault
@@ -107,12 +144,22 @@ func (m EncryptionConfiguration) MarshalJSON() ([]byte, error) {
var dataAO1 struct {
Aws *AwsConfiguration `json:"aws,omitempty"`
Azure *AzureConfiguration `json:"azure,omitempty"`
Client *KeyPairConfiguration `json:"client,omitempty"`
Gcp *GcpConfiguration `json:"gcp,omitempty"`
Gemalto *GemaltoConfiguration `json:"gemalto,omitempty"`
Image string `json:"image,omitempty"`
Replicas string `json:"replicas,omitempty"`
SecretsToBeDeleted []string `json:"secretsToBeDeleted"`
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
Server *KeyPairConfiguration `json:"server,omitempty"`
Vault *VaultConfiguration `json:"vault,omitempty"`
@@ -120,12 +167,22 @@ func (m EncryptionConfiguration) MarshalJSON() ([]byte, error) {
dataAO1.Aws = m.Aws
dataAO1.Azure = m.Azure
dataAO1.Client = m.Client
dataAO1.Gcp = m.Gcp
dataAO1.Gemalto = m.Gemalto
dataAO1.Image = m.Image
dataAO1.Replicas = m.Replicas
dataAO1.SecretsToBeDeleted = m.SecretsToBeDeleted
dataAO1.SecurityContext = m.SecurityContext
dataAO1.Server = m.Server
dataAO1.Vault = m.Vault
@@ -151,14 +208,26 @@ func (m *EncryptionConfiguration) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateAzure(formats); err != nil {
res = append(res, err)
}
if err := m.validateClient(formats); err != nil {
res = append(res, err)
}
if err := m.validateGcp(formats); err != nil {
res = append(res, err)
}
if err := m.validateGemalto(formats); err != nil {
res = append(res, err)
}
if err := m.validateSecurityContext(formats); err != nil {
res = append(res, err)
}
if err := m.validateServer(formats); err != nil {
res = append(res, err)
}
@@ -183,6 +252,28 @@ func (m *EncryptionConfiguration) validateAws(formats strfmt.Registry) error {
if err := m.Aws.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("aws")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("aws")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) validateAzure(formats strfmt.Registry) error {
if swag.IsZero(m.Azure) { // not required
return nil
}
if m.Azure != nil {
if err := m.Azure.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("azure")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("azure")
}
return err
}
@@ -201,6 +292,28 @@ func (m *EncryptionConfiguration) validateClient(formats strfmt.Registry) error
if err := m.Client.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("client")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("client")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) validateGcp(formats strfmt.Registry) error {
if swag.IsZero(m.Gcp) { // not required
return nil
}
if m.Gcp != nil {
if err := m.Gcp.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("gcp")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("gcp")
}
return err
}
@@ -219,6 +332,28 @@ func (m *EncryptionConfiguration) validateGemalto(formats strfmt.Registry) error
if err := m.Gemalto.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("gemalto")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("gemalto")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) validateSecurityContext(formats strfmt.Registry) error {
if swag.IsZero(m.SecurityContext) { // not required
return nil
}
if m.SecurityContext != nil {
if err := m.SecurityContext.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("securityContext")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("securityContext")
}
return err
}
@@ -237,6 +372,8 @@ func (m *EncryptionConfiguration) validateServer(formats strfmt.Registry) error
if err := m.Server.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("server")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("server")
}
return err
}
@@ -255,6 +392,183 @@ func (m *EncryptionConfiguration) validateVault(formats strfmt.Registry) error {
if err := m.Vault.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("vault")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("vault")
}
return err
}
}
return nil
}
// ContextValidate validate this encryption configuration based on the context it is used
func (m *EncryptionConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
// validation for a type composition with MetadataFields
if err := m.MetadataFields.ContextValidate(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateAws(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateAzure(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateClient(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateGcp(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateGemalto(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateSecurityContext(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateServer(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateVault(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EncryptionConfiguration) contextValidateAws(ctx context.Context, formats strfmt.Registry) error {
if m.Aws != nil {
if err := m.Aws.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("aws")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("aws")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateAzure(ctx context.Context, formats strfmt.Registry) error {
if m.Azure != nil {
if err := m.Azure.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("azure")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("azure")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateClient(ctx context.Context, formats strfmt.Registry) error {
if m.Client != nil {
if err := m.Client.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("client")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("client")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateGcp(ctx context.Context, formats strfmt.Registry) error {
if m.Gcp != nil {
if err := m.Gcp.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("gcp")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("gcp")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateGemalto(ctx context.Context, formats strfmt.Registry) error {
if m.Gemalto != nil {
if err := m.Gemalto.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("gemalto")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("gemalto")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateSecurityContext(ctx context.Context, formats strfmt.Registry) error {
if m.SecurityContext != nil {
if err := m.SecurityContext.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("securityContext")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("securityContext")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateServer(ctx context.Context, formats strfmt.Registry) error {
if m.Server != nil {
if err := m.Server.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("server")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("server")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateVault(ctx context.Context, formats strfmt.Registry) error {
if m.Vault != nil {
if err := m.Vault.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("vault")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("vault")
}
return err
}

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