Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow filtering controls on basis of user kind #153

Merged
merged 2 commits into from
Jan 15, 2019

Conversation

qiell
Copy link

@qiell qiell commented Jan 15, 2019

  • Add support to disable admin controls

    1. Admin Controls (exec, scaleup, scaledown etc.)
    2. Read-only Controls (logs, describe, attach)
  • Read user kind header and filter the controls
    This PR will read the header x-api-user-kind from request
    and check if it is readAdmin or not.
    If it is the readAdmin, then it will filter all the admin controls
    else it will provide all the controls.

@qiell qiell self-assigned this Jan 15, 2019
@qiell qiell requested a review from satyamz January 15, 2019 07:37
qiell added 2 commits January 15, 2019 13:39
This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
@qiell qiell force-pushed the fine-grained-controls branch from 787b67c to ec03520 Compare January 15, 2019 08:11
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1397

  • 58 of 100 (58.0%) changed or added relevant lines in 10 files are covered.
  • 4372 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.03%) to 26.757%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/api_topology.go 4 5 80.0%
prog/probe.go 0 1 0.0%
render/persistentvolume.go 0 1 0.0%
probe/probe.go 10 13 76.92%
report/controls.go 0 7 0.0%
render/detailed/node.go 4 33 12.12%
Files with Coverage Reduction New Missed Lines %
render/detailed/detailed.codecgen.go 1786 29.56%
report/report.codecgen.go 2586 35.73%
Totals Coverage Status
Change from base Build 1357: 0.03%
Covered Lines: 14649
Relevant Lines: 54748

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1397

  • 58 of 100 (58.0%) changed or added relevant lines in 10 files are covered.
  • 4372 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.03%) to 26.757%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/api_topology.go 4 5 80.0%
prog/probe.go 0 1 0.0%
render/persistentvolume.go 0 1 0.0%
probe/probe.go 10 13 76.92%
report/controls.go 0 7 0.0%
render/detailed/node.go 4 33 12.12%
Files with Coverage Reduction New Missed Lines %
render/detailed/detailed.codecgen.go 1786 29.56%
report/report.codecgen.go 2586 35.73%
Totals Coverage Status
Change from base Build 1357: 0.03%
Covered Lines: 14649
Relevant Lines: 54748

💛 - Coveralls

Copy link

@satyamz satyamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@satyamz satyamz merged commit 7a3a883 into mayadata-io:mdap-rc1 Jan 15, 2019
qiell added a commit that referenced this pull request Jan 15, 2019
Allow filtering controls on basis of user kind (#153)
qiell added a commit that referenced this pull request Jul 5, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
qiell added a commit that referenced this pull request Aug 7, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
qiell added a commit that referenced this pull request Aug 7, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
satyamz pushed a commit that referenced this pull request Aug 8, 2019
* refactor(logs): Add reporter name to error logs.

1. Adding reporter name to logs improves tracing of error.
2. Capitalize first letter of error log.

Fixes weaveworks#3306

Signed-off-by: Prince Rachit Sinha <prince.rachit@mayadata.io>

* fix: handle errors reported by the conntrack package

In particular, ENOBUFS which indicates data has been dropped.
With this change the collector will restart, thus resynchronising with
the OS.

* fix: remove unused metric SpyDuration

The call to register this metric was removed in weaveworks#633 over three years ago.
If it isn't registered then nobody can see the values.
The measurement is duplicated by metrics added in weaveworks#658.

* Defer metrics registration until we need it

This avoids app-specific metrics appearing in the probe.

* docs: Release 1.11.3

* docs: remove mention of long-deprecated boot2docker

* docs: help users to avoid opening their computer to the Internet

* bump_license

* fix(probe): Update tcptracer-bpf package to cure out-of-order events

Avoid ebpf events out of order by adding offset to time.

* Add another warning about exposing on the Internet

* Remove quay.io from release script

* Bold the warning about exposing on the Internet

* Release 1.11.4

* Update with latest changes

* Add OpenEBS CRs clientset

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add SP and Disk Support

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add new sub-topology under Hosts

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Update circle-ci from 1.0 to 2.0

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Fix unit tests in render and kubernetes

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Update circle-ci config.yaml to install dependencies

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* update circle-ci for image-tag. (#118)

Signed-off-by: Pradeep <pradeepkumar.bk96@gmail.com>

* Add cStor support in Scope

* Add support for CV, CVR & CSP in Scope

* Add proper shapes for CV, CVR & CSP

* Add status field to CV, CVR & CSP

* Remove unnecessary filter in the APITopologyGroup

* Remove unsed PodComponent method

* Filter disk when Show Pods in Volumes

Signed-off-by: Satyam Zode <satyamzode@gmail.com>

* Fix snapshot filter for show customer resources

Signed-off-by: Satyam Zode <satyamzode@gmail.com>

* Add node tag and status support

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add unknown state if status is empty (#123)

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add adjacency for the CSP, Disk & SPC

* Add adjacency for the CSP, Disk & SPC

* Fix comments for renderer

Signed-off-by: Satyam Zode <satyamzode@gmail.com>

* Change favicon.ico and title (#129)

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add adjacency between volumeSnapshot and clonedPVC (#132)

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read status only once

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Fix UI balnkout issue

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add disk status and creation time in Disk Node

This will also enable the NodeTag for Disk objects.

Signed-off-by: Satyam Zode <satyamzode@gmail.com>

* Add more details to cv volume (#137)

Signed-off-by: Satyam Zode <satyamzode@gmail.com>

* Update clientset for disk CR

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add new metadata in disk

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Update logic to add adjacency between pod and pvc (#141)

- Adjacency was made just by checking the name of pod claim name
and pvc name, issue is when two pvc in different namespace has same
name.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Remove repititive columns (#144)

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Change log level from warn to debug (#147)

Signed-off-by: Satyam Zode <satyamzode@gmail.com>

* Remove checkpoint to preserve system info of users (#149) (#150)

Signed-off-by: Satyam Zode <satyamzode@gmail.com>

* Allow filtering controls on basis of user kind (#153)

* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Fix table view

* fixed the table view for larger table headers and sidebar issue

* fixes the table header when scrolled

*  Add Block Device support (#162)

* Update openebs clientset to include block device

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Update CSP spec to incorporate changes from 0.9 and 1.0

- In 0.9, CSP spec has DiskList but in 1.0 CSP spec has BlockDeviceGroup
To support both add DiskList and Group in CSP spec and update the
clientset of the same.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add Block Device support

This commit will :-
- Visualize Block Device (shape similar to Disk)
- Add Adjacency between BlockDevice and Disk
- Add Adjacency between CSP and BlockDevice only if CSP has block device
list(1.0) otherwise add the adjacency between CSP and Disk(0.9)

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add describe control on block device

This commit will:-
- Add GetBlockDeviceList method to CSP interface.
- Add CaptureBlockDevice method which will be used to fetch the name and
namespace of selected Block Device.
- Add entry of block device in the switch case.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Update webpack and package.json

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Update ui-components dependency from openebs to mayadata

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* fixes the table header z-index issues

* Update circle ci config (#165)

* Update package.json to exclude building external client

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Update circle ci config yaml

- Builds were failing because of ci cache. Update it to use new files
instead of cached ones.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Update pvc size to read from status (#166)

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add spec and clientset of bdc

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add adjacency between pv and bdc

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Add support to visualize bdc

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
qiell added a commit that referenced this pull request Aug 13, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
qiell added a commit that referenced this pull request Aug 13, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
qiell added a commit that referenced this pull request Aug 14, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
qiell added a commit that referenced this pull request Aug 14, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
qiell added a commit that referenced this pull request Aug 23, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
qiell added a commit that referenced this pull request Sep 3, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
qiell added a commit that referenced this pull request Oct 9, 2019
* Add support to disable admin controls

This commit will categorize the controls into two types:-
1. Admin Controls (exec, scaleup, scaledown etc.)
2. Read only Controls (logs, describe, attach)

This will add a new flag i.e disableAdminControls
by default, teh value for the above flag will be false,
if value is true, all the admin controls will be disabled.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>

* Read user kind header and filter the controls

This commit will read the header "x-api-user-kind" from request
and check if it is "readAdmin" or not.
If it is the readAdmin, then it will filter all the adminControls
else it will provide all the controls.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants