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

Adding Permissions component to StepAuthorize #197

Merged
merged 166 commits into from
Aug 26, 2019
Merged
Changes from 1 commit
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
fbf03b3
Initial commit
Apr 26, 2019
56b6d36
Add AWS SDK v2 dependency
Apr 30, 2019
c4ea0ca
Add aws package and service class, also fix broken commons-codec import
Apr 30, 2019
e714758
Add aws package and service class, also fix broken commons-codec import
Apr 30, 2019
a7f4694
Include the latest version of the Apache Http Client
May 13, 2019
c98a8fc
Improve HTTP Client dependency comment
May 13, 2019
64299e2
Add Kinesis SDK
May 17, 2019
a3e399d
General UI Skeleton (#75)
kyleknighted Jun 13, 2019
fe3669c
AWS Cloudwatch backend API calls
Jun 13, 2019
08908b0
Integrate AWS Health Check with Kinesis record retrieval (#86)
Jun 18, 2019
da59011
Add Available Services API call (#82)
Jun 19, 2019
f1bc2fb
Backend code cleanup (#90)
Jun 19, 2019
5012a68
Pass region and AWS credentials with AWS API requests (#92)
Jun 25, 2019
8bc1d17
Aws permissions check (#113)
Jun 27, 2019
8de1126
Save AWS input API endpoint (#93)
Jun 27, 2019
a27c752
Add missing Guice annotation that were preventing server startup
Jun 27, 2019
0e9a3b8
Merge branch 'master' into aws and fix conflicts
Jun 27, 2019
dc91a60
Return JSON message field list in response from Health Check (#114)
Jul 1, 2019
893a54b
Simple Clickthrough without API
kyleknighted Jun 11, 2019
43ed5fa
Advanced Kinesis Options
kyleknighted Jun 12, 2019
ee606e7
Cleanup
kyleknighted Jun 13, 2019
c441248
currently busted toggle
kyleknighted Jun 13, 2019
ce351be
redo state handling
kyleknighted Jun 13, 2019
6574825
Remove artifact
kyleknighted Jun 13, 2019
577b6d8
removing commented code
kyleknighted Jun 13, 2019
c2a1051
removing unnecessary functions
kyleknighted Jun 13, 2019
1c0a980
pr feedback
kyleknighted Jul 1, 2019
0d866a7
Rebase conflicts
kyleknighted Jul 1, 2019
739d1bc
Merge pull request #77 from Graylog2/advanced_option_fields
dennisoelkers Jul 1, 2019
b951618
Fix several issues from PR review
Jul 2, 2019
0c81d91
"Final Review" layout (#83)
kyleknighted Jul 2, 2019
27f54be
Route constants (#111)
kyleknighted Jul 2, 2019
76054c2
AWS lockfile
kyleknighted Jul 2, 2019
85d0074
Merge pull request #121 from Graylog2/aws_lockfile
dennisoelkers Jul 3, 2019
8ba63e8
Add validation to fields and form
kyleknighted Jun 17, 2019
83bf761
beginning to restructure form validation
kyleknighted Jun 17, 2019
5d091e0
Convert state to hooks
kyleknighted Jun 18, 2019
eac5c9e
Setting up necessary hooks
kyleknighted Jun 18, 2019
c7a008d
Removing input validation steps to reduce PR
kyleknighted Jun 18, 2019
1034d98
Rebasing
kyleknighted Jun 18, 2019
1bfe81a
Rename StyledForm
kyleknighted Jul 1, 2019
90258a3
DEFAULT_VALUES
kyleknighted Jul 2, 2019
b2d4c02
cleanup hook returns
kyleknighted Jul 2, 2019
6e6153a
Moving some reducers to state and breaking apart the rest
kyleknighted Jul 3, 2019
31f955c
Remove functions from Input values
kyleknighted Jul 3, 2019
03966c4
Steps function cleanup
kyleknighted Jul 3, 2019
532bbb3
Remove commented import
kyleknighted Jul 3, 2019
bf30ead
FormDataProvider and Context
kyleknighted Jul 8, 2019
2662e0e
Steps Context & provider
kyleknighted Jul 8, 2019
e0ceb3d
log and advancedoptions moved to context and provider
kyleknighted Jul 8, 2019
dac8001
FormWrap functional component
kyleknighted Jul 8, 2019
9eedd39
renaming things
kyleknighted Jul 8, 2019
cdec272
lint error
kyleknighted Jul 8, 2019
1e05fa6
PR feedback
kyleknighted Jul 10, 2019
3cf005b
Merge pull request #84 from Graylog2/react_hook_state
dennisoelkers Jul 10, 2019
b029134
Add validation to fields and form
kyleknighted Jun 17, 2019
9d215d4
beginning to restructure form validation
kyleknighted Jun 17, 2019
3f24e5f
Convert state to hooks
kyleknighted Jun 18, 2019
82268e6
error and dirty states
kyleknighted Jun 20, 2019
38a9ad9
Error on submit
kyleknighted Jun 20, 2019
f50acdc
Update validation to new state hooks
kyleknighted Jul 10, 2019
6c2afff
remove unneeded defaults
kyleknighted Jul 10, 2019
74c2dbb
Output error messages
kyleknighted Jul 10, 2019
706c971
text key instead of password
kyleknighted Jul 11, 2019
e9babef
Remove field validation
kyleknighted Jul 11, 2019
8d91067
Update comment blocks (#137)
Jul 11, 2019
ad2826c
Merge pull request #85 from Graylog2/form_validation
dennisoelkers Jul 12, 2019
eb1d464
Update version to 3.1.0-beta.2-SNAPSHOT
Jul 12, 2019
5dba5bc
Implement AWS codec selector with tests (#116)
Jul 15, 2019
ad56e90
Updating yarn lockfile. (#119)
dennisoelkers Jul 2, 2019
f324dea
Updating yarn lockfile. (#127)
dennisoelkers Jul 10, 2019
fbfa54d
Bump package.json version to 3.1.0-beta.1
garybot2 Jul 12, 2019
944a9be
Revert version to 3.1.0-SNAPSHOT
bernd Jul 12, 2019
24c2cf6
Bump package.json version to 3.1.0-beta.1
garybot2 Jul 12, 2019
d2ad7a7
Bump package.json version to 3.1.0-beta.2-SNAPSHOT
garybot2 Jul 12, 2019
3f78e8c
Authorize and Streams API
kyleknighted Jun 21, 2019
685cac1
All API calls except Save
kyleknighted Jun 24, 2019
6cf8576
reverting to hooks for api calls
kyleknighted Jul 11, 2019
ee7a090
Regions hook
kyleknighted Jul 11, 2019
c22aa61
Streams and Logs
kyleknighted Jul 11, 2019
cd5fb58
streams useFetch
kyleknighted Jul 12, 2019
c4b669a
log sample
kyleknighted Jul 12, 2019
5550a5c
generic loading states
kyleknighted Jul 12, 2019
560be89
move regions
kyleknighted Jul 12, 2019
cee99d0
adding some documentation
kyleknighted Jul 12, 2019
3c83f25
Adding all the files
kyleknighted Jul 12, 2019
54982bf
removing uneeded
kyleknighted Jul 12, 2019
11804bc
cleanup
kyleknighted Jul 12, 2019
945f369
ApiRoutes
kyleknighted Jul 15, 2019
f477183
import proper path
kyleknighted Jul 15, 2019
60abbd8
Changing up useFetch
kyleknighted Jul 15, 2019
5e31920
need the values...
kyleknighted Jul 15, 2019
1f7b74b
lint
kyleknighted Jul 15, 2019
37520b0
Removed unneeded inline cURL API documentation (#143)
Jul 16, 2019
392706b
Use standard field names for AWS key and secret (#144)
Jul 16, 2019
695c567
rename useFetch file
kyleknighted Jul 17, 2019
e622371
better var naming in kinesisstreams:
kyleknighted Jul 17, 2019
69b91c2
Update useFetch props
kyleknighted Jul 17, 2019
c6de790
AWS transport selector with tests (#117)
Jul 17, 2019
6bcdd8e
Add missing permissions for sample AWS policy (#122)
Jul 17, 2019
d04637c
Merge pull request #132 from Graylog2/api_fetch_provider
dennisoelkers Jul 17, 2019
9441e89
API Save Input (#145)
kyleknighted Jul 17, 2019
d78da0f
Adding match function to pluginmanifest
kyleknighted Jul 16, 2019
84d1c7e
custom component
kyleknighted Jul 18, 2019
32b6c8e
Update version to 3.1.0-beta.3-SNAPSHOT
Jul 18, 2019
e4ee0c2
Update version to 3.1.0-beta.3-SNAPSHOT
Jul 18, 2019
482d36a
Merge pull request #142 from Graylog2/new_aws_integration_experience
dennisoelkers Jul 19, 2019
26938fb
Aws kinesis newstream (#129)
Jul 19, 2019
a3506d2
Unload Confirmation Dialog (#148)
kyleknighted Jul 25, 2019
f690124
Remove emotion and use styled-components (#157)
kyleknighted Jul 25, 2019
6b8314a
Move title and description to FormWrap for consistent layout
kyleknighted Jul 25, 2019
590f03b
Handle validation per-step
kyleknighted Jul 25, 2019
8af7a96
fix aws key h4x
kyleknighted Jul 25, 2019
5f7ac60
styled validatedinput
kyleknighted Jul 25, 2019
74a2fe4
enable health check and review forms
kyleknighted Jul 25, 2019
23493b8
Merge pull request #166 from Graylog2/form_error_handling
kmerz Jul 26, 2019
358be0f
Starting Error Handling
kyleknighted Jul 17, 2019
332bcb2
Output API Errors
kyleknighted Jul 17, 2019
f741b3c
remove some more debugging
kyleknighted Jul 17, 2019
bec9cab
Validate API Key & Secret and output styled errors
kyleknighted Jul 24, 2019
db8c645
Error message if stream doesn't contain any logs
kyleknighted Jul 25, 2019
45f8f71
Return a 4xx response for an unsuccessful health check
Jul 25, 2019
d5d0ac5
Save API Error Handling
kyleknighted Jul 25, 2019
59a6642
Remove `success` flag from HealthCheckResponse
Jul 25, 2019
d06d869
Throw `BadRequestException` if no Kinesis streams are found
Jul 25, 2019
50bd853
Throw `BadRequestException` if no Kinesis CloudWatch groups are found
Jul 25, 2019
c463f0e
Error message styling
kyleknighted Jul 25, 2019
2b88d28
wrap up api errors and adding styles
kyleknighted Jul 25, 2019
11e6d18
rebasing and cleanup
kyleknighted Jul 26, 2019
920a4a4
trim input values
kyleknighted Jul 26, 2019
561707a
remove defaults
kyleknighted Jul 26, 2019
e6e0378
Create input with togglable masking
kyleknighted Jul 26, 2019
cf52d5a
Include stream name in error
Jul 30, 2019
edb80a9
Port of existing KinesisTransport (#140)
Jul 31, 2019
6ea58a9
Upgrade to latest Kinesis Client version (#151)
Jul 31, 2019
2a4c695
Update Throttling advanced option (#169)
kyleknighted Jul 31, 2019
0a29e8e
Shells/mocks for Kinesis Auto setup API endpoints (#167)
Aug 1, 2019
9837b12
Merge branch 'aws' into api_error_handling
kmerz Aug 2, 2019
cbf7afe
Merge pull request #168 from Graylog2/aws_secret_toggle_masking
kmerz Aug 2, 2019
d1172ab
Fix linter warning
kmerz Aug 2, 2019
68d423e
Merge pull request #146 from Graylog2/api_error_handling
kmerz Aug 2, 2019
c841f1f
Add RolePermissions for Kinesis stream (#163)
Aug 2, 2019
7d7447c
Update version to 3.1.0-rc.2-SNAPSHOT
Aug 2, 2019
7e1da91
Add addSubscriptionFilter to CloudwatchService (#160)
Aug 2, 2019
af8032b
Bump version to 3.1.0-rc.3-SNAPSHOT
Aug 9, 2019
ae287ae
Kinesis Auto-setup (#186)
Aug 13, 2019
fcf05e2
Mock responses
Aug 13, 2019
cba5b06
Add default setting for prefix field
Aug 13, 2019
9490c31
Add support for assuming an ARN role (#188)
Aug 14, 2019
62c6817
Record when users agree to auto-setup (#194)
Aug 14, 2019
85b4ad0
Adding Permissions component to StepAuthorize
kyleknighted Aug 14, 2019
964cd62
clear sidebar on unmount
kyleknighted Aug 14, 2019
7870528
Fixing select default value (#199)
kyleknighted Aug 14, 2019
51da339
Adding pattern to Stream Name input (#200)
kyleknighted Aug 14, 2019
d19fb62
Add API request to get permissions (#196)
Aug 14, 2019
e3d90e5
Minor code clean up (#201)
Aug 14, 2019
773b9c8
Make auto-setup unit test pass when mocking enabled
Aug 14, 2019
56a5a40
Bump version to 3.2.0-SNAPSHOT
Aug 16, 2019
f1f2f4a
Bump version to 3.2.0-SNAPSHOT
Aug 16, 2019
93a3526
Merge branch 'aws_permissions_ui' of github.com:Graylog2/graylog-plug…
kyleknighted Aug 16, 2019
2116eeb
conflicts
kyleknighted Aug 16, 2019
7a2a047
conflicts
kyleknighted Aug 16, 2019
6fc9872
Adding Policies API
kyleknighted Aug 16, 2019
edf9e07
bad comment
kyleknighted Aug 16, 2019
a2f6770
merge conflicts
kyleknighted Aug 26, 2019
955567a
Adjust permissions wording
Aug 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding Policies API
kyleknighted committed Aug 16, 2019
commit 6fc98727a7c512108d1b0901366b9d49dc6c4d86
17 changes: 7 additions & 10 deletions src/web/common/Permissions.jsx
Original file line number Diff line number Diff line change
@@ -37,35 +37,32 @@ Policies.propTypes = {
};

export default function Permissions() {
const [permissionsStatus] = useFetch(
ApiRoutes.INTEGRATIONS.AWS.PERMISSIONS,
(response) => {
console.log('permissions', response);
},
);
const [permissionsStatus] = useFetch(ApiRoutes.INTEGRATIONS.AWS.PERMISSIONS);

return (
<Panel bsStyle="info" header={<span>AWS Policy Permissions</span>}>
{ // TODO: Update content }
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ipsa debitis, voluptatum id illo excepturi, magni recusandae accusamus veritatis repellendus nam voluptas nihil ad dolorum dolores cum laboriosam minima cupiditate necessitatibus.</p>

{/* {!permissionsStatus.loading && (
{!permissionsStatus.loading && permissionsStatus.data && (
<>
<Policies title="Recommended Policy"
note="To be able to use all available functionality for Kinesis setup."
policy={permissionsStatus.data.setup_policy} />
policy={JSON.parse(permissionsStatus.data.setup_policy)} />

<Policies title="Least Privilege Policy"
note="Doesn&apos;t include Kinesis auto-subscribtion controls."
policy={permissionsStatus.data.auto_setup_policy} />
policy={JSON.parse(permissionsStatus.data.auto_setup_policy)} />
</>
)} */}
)}
</Panel>
);
}

const Header = styled.header`
display: flex;
align-items: center;
cursor: pointer;
`;

const HeaderContent = styled.div`
6 changes: 3 additions & 3 deletions src/web/common/ValidatedInput.jsx
Original file line number Diff line number Diff line change
@@ -40,9 +40,9 @@ const ValidatedInput = ({ help, onChange, id, label, fieldData, type, ...restPro
type={type}
onChange={handleChange}
onBlur={checkValidity}
bsStyle={(error && dirty && 'error') || null}
defaultValue={(type !== 'select' && value) || null}
value={(type === 'select' && value) || null}
bsStyle={(error && dirty && 'error') || undefined}
defaultValue={(type !== 'select' && value) || undefined}
value={(type === 'select' && value) || undefined}
label={<Label label={label} error={error} />}
help={help} />
);