-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
feat: access tokens user management UI #3587
Conversation
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
[skip ci] Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks really good!
I tried it out locally and didn't find anything major.
I would suggest adding a confirmation popup when Revoking a developer token. Maybe that would be useful for Terminate and Terminate all others as well.
In the developer tokens part I see the text says "on [...]" and then the string ends. Looking at the source it looks like it should describe the device. I did my test with cURL (UA curl/7.68.0
). I think there should be some fallback "N/A" value or the raw UA?
I would also suggest replacing the hidden token value by a hard-coded number of stars. Showing ****
would probably be enough, no need for such a long string.
And finally I'd suggest wrapping the revealed token value in <code></code>
to make it stand out better and potentially make it easier to select in some browsers (?)
PS: video in first post doesn't play in Firefox. But works in Chrome
Will do! thanks for the review! |
In my view the answer to this is yes, if the system get's compromised or something it would be good for it to be possible for the admin to revoke all sessions and/or tokens. HOWEVER, whether this should be a individual user view where the admin can close just a single users sessions, or just a button on the admin side that wipes all of the sessions is another matter. I do think that token removal should be on an individual user level though in terms of admin deletion. As my view of it is that it's a way for admins to moderate tokens (if say someone is abusing them)
It should not be a separate extension, I view it as a critical security feature that should be part of core. |
Then maybe we should create a |
That seems like a reasonable idea, I wouldn't want anyone seeing the values other than the users anyway. Most sites only allow the viewing of a token once anyway even for the users. |
Signed-off-by: Sami Mazouz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing. Just a couple of things, really.
Also, I think the frontend additions need to be added to their respective compat
files?
import app from '../app'; | ||
import Component, { ComponentAttrs } from '../../common/Component'; | ||
import icon from '../../common/helpers/icon'; | ||
import uaParser from 'ua-parser-js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am having concerns about our bundle size nowadays. Could we potentially lazy-load this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, switched to parsing the UA on the backend side
# Conflicts: # framework/core/js/src/common/Application.tsx # framework/core/locale/core.yml # yarn.lock
Signed-off-by: Sami Mazouz <[email protected]>
Co-authored-by: David <[email protected]> Signed-off-by: Sami Mazouz <[email protected]>
Co-authored-by: David <[email protected]> Signed-off-by: Sami Mazouz <[email protected]>
…le size Signed-off-by: Sami Mazouz <[email protected]>
value: Mithril.Children; | ||
} | ||
|
||
export default class DataSegment<CustomAttrs extends IDataSegmentAttrs = IDataSegmentAttrs> extends Component<CustomAttrs> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe LabelValue
-something?
Overall, I think this is great. |
|
Co-authored-by: David Wheatley <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Signed-off-by: Sami Mazouz <[email protected]>
Picks up from #2651 and #2074
Changes proposed in this pull request:
Introduces the following:
Reviewers should focus on:
After reading the above behavior ^, any opinions if anything should be done differently? such as:
Checkout integration tests method names for further behavior understanding.
Video
https://user-images.githubusercontent.com/20267363/183262689-0de50d68-91db-48d6-a5f9-c252d789c553.mp4
Screenshot
Necessity
Confirmed
composer test
).