Commit Graph

90 Commits

Author SHA1 Message Date
Alex
63f4150232 Added pagination to users page (#100)
Added pagination to users page for mcs, this resolves #96

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-05-06 21:47:41 -07:00
César Nieto
3bfc2556fc authenticate websocket apis using sts (#97) 2020-05-06 16:47:49 -05:00
César Nieto
511cc47d2b Add console logs api and integrate it with UI (#90)
Uses same behavior as the Trace feature using websockets.
For displaying it on the UI it needed to handle colors
since the log message comes with unicode colors embbeded
on the message.
Also a special case when an error log comes needed to be handled
to show all sources of the error.
2020-05-05 15:12:04 -07:00
Alex
9660650f41 Settings forms connection (#95)
Connected the forms to backend to send & receive the information stored in MinIO settings

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-05-05 11:07:06 -07:00
Lenin Alevski
9ac754d4de MCS use the correct region to authenticate users (#94)
Previous mcs was authenticating all the users agains <empty> region,
this was a problem when an admin configure a different region via the
configuration page on mcs, now before authenticating a user via
credentials or idp mcs will ask minio what's the current region and try
to authenticate using that that information.

- Login to mcs
- Go to the configuration page and change the region, ie: us-west-1
- Logout from mcs
- Login to mcs again, you should not get any error
2020-05-04 18:18:04 -05:00
César Nieto
646318e1f6 Add list and delete service accounts api (#91) 2020-05-04 15:48:38 -07:00
César Nieto
beb1ac7d04 add CREDITS file (#93) 2020-05-04 15:41:16 -07:00
César Nieto
f3a9311374 add comments to exported functions (#92) 2020-05-04 15:28:49 -07:00
Lenin Alevski
44d8e9b975 idp integration for mcs (#75)
This PR adds support for oidc in  mcs, to enable idp
authentication you need to pass the following environment variables and
restart mcs.

```
MCS_IDP_URL=""
MCS_IDP_CLIENT_ID=""
MCS_IDP_SECRET=""
MCS_IDP_CALLBACK=""
```
v0.0.2
2020-05-01 08:38:52 -07:00
Alex
f3d7e61ddb Updated material-ui dependency (#88)
Updated material-ui dependency and fixed a couple os issues that could cause the application to crash
2020-04-30 18:11:34 -07:00
Daniel Valdivia
526c0f4796 UI utils file (#87) 2020-04-30 12:19:33 -07:00
Daniel Valdivia
fe1acaa4b6 Admin Trace UI (#86) 2020-04-30 11:53:50 -07:00
César Nieto
8e9bd8728a Add mcs admin trace api (#82)
Trace Api uses websocket to send trace information, a
valid jwt token needs to be sent either on the header
or as a cookie of the ws request to start.
Three goroutines are needed to ensure communication
if read hearbeat fails all trace should stop by cancelling
the context. WaitGroups are needed to ensure all
goroutines finish gracefully.
2020-04-30 10:50:51 -07:00
Alex
9df9309c66 Configuration List Forms (#83)
Created Lists & forms for configurations in mcs
2020-04-30 00:00:02 -05:00
César Nieto
b85712e29e Add Create Service Account api (#72)
adds new functionality for creating a service
account for a user, for this, an admin client
is created with the user credentials so that
the service account can be assigned to him.

This also updates to  minio RELEASE.2020-04-28T23-56-56Z
2020-04-29 18:28:28 -07:00
Daniel Valdivia
c32df86c76 use target implementation on config api (#81)
Co-authored-by: Cesar Nieto <ces.nietor@gmail.com>
2020-04-29 10:54:59 -07:00
Lenin Alevski
0f52136fd2 STS integration, JWT auth and Stateless MCS (#70)
This commit changes the authentication mechanism between mcs and minio to an sts
(security token service) schema using the user provided credentials, previously
mcs was using master credentials. With that said in order for you to
login to MCS as an admin your user must exists first on minio and have enough
privileges to do administrative operations.

```
./mc admin user add myminio alevsk alevsk12345
```

```
cat admin.json

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "admin:*",
        "s3:*"
      ],
      "Resource": [
        "arn:aws:s3:::*"
      ]
    }
  ]
}

./mc admin policy add myminio admin admin.json
```

```
./mc admin policy set myminio admin user=alevsk
```
2020-04-22 23:43:17 -07:00
Alex
605b80037a Fixed users list issue (#80)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-04-22 16:40:27 -07:00
Daniel Valdivia
63b430e354 Bug: User List not refreshing after delete (#79) 2020-04-21 17:48:55 -05:00
Alex
d9c212fe2f Tables replacement in mcs (#74)
Replaced all the tables in mcs to be consistent with the new design

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-04-21 15:38:46 -07:00
Daniel Valdivia
5fa0a0fca8 Bug: SSL Mode options for Postgres (#77) 2020-04-21 13:34:15 -07:00
Daniel Valdivia
068ac281ea UI Add Notification Targets (#73) 2020-04-20 20:53:58 -07:00
Alex
0bcf88eb7c Table component implementation (#71)
Implementation of a new table wrapper component that will be used across the application.

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-04-18 08:16:17 -07:00
César Nieto
5c137a8678 Update mcs to latest minio and mc (#69)
updates code to be compatible with:
- github.com/minio/mc v0.0.0-20200415193718-68b638f2f96c
- github.com/minio/minio v0.0.0-20200415191640-bde0f444dbab

Note: admin_config api is patched temporarily now to
return the target configuration as a raw string due to the
changes done on minio.
2020-04-16 13:56:12 -07:00
Alex
540ff31784 Added bulk functionality for add users to groups (#68)
Added functionality in users module to add multiple users to multiple groups at once.

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-04-15 18:08:35 -07:00
Daniel Valdivia
82ea3c1ac4 UI list Lambda Notification Targets (#67) 2020-04-14 14:52:59 -07:00
Alex
e1f177257a Updated form dialog components to be using ModalBoxWrapper component (#66)
Updated all form dialog components in mcs to be using the new ModalBoxWrapper component, This doesn't affect delete dialogs since we are going to create an independent component for those.

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-04-13 22:27:34 -07:00
Alex
0211827c74 Removed console messages in mcs-users module (#65)
Removed console messages in mcs-users module
2020-04-13 17:06:43 -07:00
Daniel Valdivia
ac5732970c New Logo (#64) 2020-04-13 10:59:46 -07:00
Alex
1b1ed55252 Creation of reusable components for mcs & implementation in users page (#63)
Creation of reusable componentes for mcs:
- ModalWrapper => Modal box component with MinIO styles
- InputBoxWrapper => Input box component with MinIO styles
- RadioGroupSelector => Component that generates a Radio Group Selector combo with the requested options and MinIO styles

Implementation of these new components in users creation / edit components

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-04-10 22:13:31 -07:00
Alex
5c5e84b289 Implemented User-Groups integration for mcs (#62)
Implemented user-groups integration for mcs, this allows to store the user groups during the user creation.

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-04-09 16:39:49 -07:00
Daniel Valdivia
5755b98b66 API to list and add Notification Endpoints (#50) 2020-04-09 16:07:26 -07:00
Harshavardhana
86ee1eea6d add code of conduct, contributing and security guidelines (#61) 2020-04-09 12:04:15 -07:00
Harshavardhana
adcbf61049 add support for mcs build to trim gopaths (#60)
also remove `version` sub-command as we don't
use this anymore, just use `mcs --version`
2020-04-09 11:29:49 -07:00
Alex
e197399441 Users-Group Update API (#49)
* Added structure to swagger

* Added updateUserGroups handlers

* Updated return definition for user groups.

* Logic rewrite

* Removed logs

* Added some tests to updateUserGroups

* lint fix

* Updated tests for the new API

* Lint

* Added comment about why we are setting this groups individually. & more lint fixes

* Updated tests page

* Added more tests & fixed comments for PR

* Lint utils file

* Fixed import orders

* Changed import order

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-04-08 17:38:18 -07:00
Lenin Alevski
ff2438a877 Logout endpoint (#47)
Delete in memory session when user logout from mcs

lint fixes

Click logout button triggers logout request

Clicking the actual logout button send the POST /logout request on mcs
UI

Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2020-04-08 14:36:14 -05:00
César Nieto
c85067dfba UI remove setting access on make bucket (#46)
Remove CUSTOM option on access to set
2020-04-08 07:44:32 -07:00
Daniel Valdivia
b1df170d80 Change font to Lato (#48) 2020-04-07 17:31:26 -07:00
Daniel Valdivia
9566f6e579 Fix Groups Empty (#45) 2020-04-07 13:29:40 -07:00
Daniel Valdivia
12a682e9f6 Redirect to Login when not logged in. (#44) 2020-04-07 11:56:52 -07:00
César Nieto
e0bb098e47 mcs delete bucket event notification api (#36)
Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2020-04-07 09:27:25 -07:00
Lenin Alevski
b390ce309a Reading policy as json string (#43)
addPolicy endpoint will read policies as json string, this to allow
s3 iam policy compatibility (uppercase in json attributes) and to be
consistent with other mcs apis, once https://github.com/minio/minio/pull/9181
is merged we can return a type struct{}

fix policies test to new refactor

goimports

more golint fixes
2020-04-06 19:10:10 -07:00
Alex
3dac86d3ce Implements remove user API (#42)
* Implementation of RemoveUser from madmin

* Added removeUser structure.

* Added removeUserResponse actions

* Added delete API to swagger

* Added tests to removeUser functions

* Removed extra space at EOF

* Changed context to be a parameter in admin_users functions

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2020-04-06 18:07:32 -07:00
Daniel Valdivia
2001ab6dae Logout on Unauthorized. Fix all UI warnings. (#35) 2020-04-06 16:35:30 -07:00
César Nieto
31f0655ff6 mcs add tests for groups and mock same function twice (#41) 2020-04-06 16:18:28 -07:00
César Nieto
775874cf86 update golangci-lint to v1.24 on github workflow (#40)
* update golangci-lint to v1.24 on github workflow

* fix lint errors
2020-04-06 16:04:18 -07:00
Lenin Alevski
9ca4daa906 TLS redirect enabled by default (#39)
When certificates are provided to mcs, tls direct will be
enabled by default (http://localhost -> https:localhost), you
can change this behavior by providing the `MCS_SECURE_SSL_REDIRECT=off`
env variable
2020-04-06 15:59:21 -07:00
Lenin Alevski
2318a8a82b disabling default tls redirect (#38)
Co-authored-by: César Nieto <ces.nietor@gmail.com>
2020-04-06 15:22:39 -07:00
Daniel Valdivia
69ed6f5ca4 Development md (#34)
* Introduce DEVELOPMENT.md

* Ignore *.orig files

Co-authored-by: Lenin Alevski <alevsk.8772@gmail.com>
2020-04-06 14:22:27 -07:00
Lenin Alevski
3a96e6d7e7 Secure Middleware (#37)
adding secure middleware to enforce security headers, most
of the options can be configured via env variables

adding prefix for mcs env variables

adding http redirect to https, adding csp report only, etc

solving conflicts

passing tls port configured by cli to secure middleware

update go.sum

adding default port, tlsport, host and tlshostname

fix tlsport bug
2020-04-06 13:24:15 -07:00