Commit Graph

51 Commits

Author SHA1 Message Date
Vladimir Gorej
6c10e4a070 fix(auth): compensate for uninitialized config
Refs #7814
2022-01-31 14:27:46 +01:00
Christian Egli
c6d8d779d0 feat: do not ask for client secret when using auth code with PKCE (#7438)
Co-authored-by: Ignacio Lozano <nacholozano@gmail.com>
Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>

Refs #6290
2022-01-26 10:56:09 +01:00
Sviataslau Hankovich
a740f3d32e fix: remove redundant whitespaces in API key auth popup (#7538) 2021-10-08 16:52:32 +03:00
Tim Lai
21c29469bc refactor(auth): rename auth flow constants to be more descriptive (#7061) 2021-03-10 15:53:14 -08:00
Ilya Lipnitskiy
0807687f91 feat(auth): Add OIDC support (#3517) (#6549)
spec/actions.js: Add OIDC metadata fetching

components/auth/oauth2: Add OIDC URL to the Authorization popup
2020-12-09 10:11:33 -08:00
Tim Lai
0a807d6237 fix(auth): support for oauth2 relative url (#6546)
* Handle relative urls for oauth authorization

The full URL is computed based on the current selected server
if a relative URL is used as authorizationUrl
or tokenUrl


Co-authored-by: Eliot Berriot <contact@eliotberriot.com>
2020-10-21 15:46:31 -07:00
Adam Stachowicz
65ea764b61 fix: add autofocus to auth fields (#6483) 2020-10-14 19:23:19 -07:00
Amir Bitaraf Haghighi
96aecc8860 feat: Preserve authorization on browser refresh and close/reopen (#5939)
* Add default configuration `preserveAuthorization`

* Add localStorage to auth plugin

* Add persistAuthorization unit tests

* Refactor persistAuthorization to use wrapped actions

* Upgrade unit tests to be compatible with jest

* Add persistAuthorization documentation


Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2020-09-11 14:05:37 -07:00
Vladimir Gorej
a616cb471d fix(Markdown): render markdown in more secure way
This commit changes markdown sanitization behaviour in following way:

class, style and data-* attributes are removed by default. These attributes
open possible vulnerability vectors to attackers.

The original behavior of sanitizer (before this commit) can be enabled by *useUnsafeMarkdown* configuration option.
Use this configuration option with caution and only in cases when you know
what you're doing.
2020-06-11 21:51:15 +02:00
tomdegoede
fc3ed30f3d improvement: Move inline styles to SCSS instead (#5578)
* fix: convert propStyle to propClass
2020-06-10 16:39:48 -07:00
Matthew Morrissette
275c8f2ccf improvement: oauth "scopes" improvements (#6037)
* improvement: oauth "scopes" init parameter

* improvement: add "select all" and "select none" to oauth scopes popup
2020-06-10 11:27:54 -07:00
Simran
95e72e7c70 improvement: do not require basic password in UI (#5812)
* Fix basic-auth.jsx: do not require password in UI

password is not PropTypes.string.isRequired, but the markup wrongly makes it mandatory

* Do not require password input in http-auth.jsx

This is used by the Authorize modal. Not sure when the similar code from basic-auth.jsx is used.

Co-authored-by: kyle shockey <kyle.shockey1@gmail.com>
2020-03-22 19:53:04 -04:00
Simon Legg
c9d6ac4cfc improvement: clear auth information from memory when logging out (#5316)
* clears authentications when logout is clicked

* tests the headers sent in the network request

* adds test for multiple api keys

* refactors tests to extract common uses

* correct test message description

Co-authored-by: kyle shockey <kyleshockey@gmail.com>
2020-01-14 21:20:39 -05:00
dalbrx-forcam
44acf85d0d improvement: use type 'password' instead of text for client secret (#5262)
Co-authored-by: kyle shockey <kyleshockey@gmail.com>
2020-01-11 17:26:54 -05:00
kyle
5f6ec8ce1d fix: mitigate "sequential @import chaining" vulnerability (#5616)
* `test/e2e-cypress/tests/features/xss/` -> `test/e2e-cypress/tests/security`

* add tests

* filter <style> tags out of Markdown fields

* initialize OAuth inputs without applying `value` attribute
2019-09-20 13:19:08 -07:00
kyle
a5568f9e16 improve: OAuth2 UI and test suite (via #5066)
* create `features` folder

* add base oauth2 server

* continue implementing OAuth tests

* WIP

* add password flow tests

* modify Password flow credential types

* remove query string credential type

* add test case for Authorization flow

* add specific Authorization value for Password flow test

* WIP

* fix linter issues
2018-12-07 20:54:29 +01:00
kyle
004f107ec4 fix: repair schemes servers rendering (via #4913)
* create AuthorizeBtnContainer

* remove Servers and AuthorizeBtn from Schemes' concern

* add AuthorizeBtnContainer to base

* strengthen OAS3 definitionsToAuthorize

* drop obsolete tests

* linter fixes
2018-10-01 20:27:52 -05:00
kyle
0359f9c364 housekeeping: bundle size reductions (#4713)
* set new bundlesize goal
* preserve `GeneratorFunction` instead of all function names
* use js-yaml fork that doesn't require esprima
* set HTML content directly, instead of using React-Markdown
* use remarkable for all Markdown rendering
* add babel-plugin-transform-react-remove-prop-types
* remove SplitPaneMode plugin
* remove react-collapse
* remove AST plugin, and yaml-js
* trim Markdown HTML string output before rendering
* disable obsolete function name preservation
* add `getComponent` to propTypes
2018-07-19 13:48:39 -07:00
kyle
83232dc2d8 v3.12.0 (#4282)
* Use `parameterWithMeta` to get parameter data in <ParameterRow>

* Prefer specPath when fetching resolved subtrees in OperationContainer

* Add test for OAS3 callback rendering

* Remove debugger statement

* Pass base resolution URL directly to Swagger-Client subtree resolver

* Remove accidental comment

* Migrate additional options

* Don't default to empty Map when getting subtree

* fix(validateParam): check for ImList type before using count method

* Use `replaceState` to update `urls.primaryName`

This gives us the stateful URL we want, without:
(a) refreshing the page on update
(b) creating a long, useless history for the user
(c) implying that browser history is two-way bound
    to Swagger-UI (it isn't, we don't have a router)

* Add `fn.opsFilter` docs and internal API versioning note

* restrict `x-example` functionality to Swagger 2.0

* polish Authorize + Close buttons

* add tachyons; use it for padding the new Reset button

* v3.12.0

* rebuild dist
2018-03-02 21:13:00 -08:00
Charles Capps
861cc65cff improve: add "Close" button to OAuth dialog, rename "Done" button elsewhere (#4212)
* Rename "Done" button to "Close", and add "Close" button OAuth dialog
* move Close button to the right
2018-03-02 18:40:54 -08:00
maryscar
2f236982f8 improve(a11y): visibility accessibility via aria-label (#4127)
* Added aria-label for visual readers.

* Increased font weight for Models section span to meet contrast ratio visibility requirements.
2018-01-25 12:41:26 -08:00
Kyle Shockey
640050e54e Add spacing between done and authorize button 2017-11-23 12:35:00 -06:00
kyle
20cf8a3b1b Merge branch 'master' into master 2017-11-22 12:22:09 -08:00
Minasokoni
a7818d5983 Auth modal close button addded 2017-11-21 14:10:22 -05:00
Christoph Kappestein
774acb1f28 add flow to make scope checkbox id unqiue 2017-11-18 09:59:15 +01:00
Kyle Shockey
f382e8d72d Display name security scheme property for apiKey type 2017-11-17 20:39:38 -08:00
Kyle Shockey
21bf5919a9 Rewire AuthorizeOperationBtn; create new selector for filtering definitions 2017-11-06 20:42:47 -08:00
Kyle Shockey
7c917325f0 Linter fixes 2017-10-20 19:31:52 -07:00
Kyle Shockey
c9674a1fc5 Refactor Auths component flow; create component that supports HTTP auths 2017-10-18 21:23:28 -07:00
Kyle Shockey
d677e534c3 WIP 2017-10-13 21:23:45 -07:00
Kyle Shockey
8b81bcac48 OAS3 Auth MVP 2017-10-11 16:58:24 -07:00
Austin
73f89fc2fd Added href attribute to <use> tags with deprecated xlinkHref attribute. 2017-07-19 20:16:53 -05:00
RVKen
d36f0a6dbd fix eslint issues 2017-06-29 04:37:19 +02:00
Anna Bodnia
ee2e82390b fixes #3191 2017-06-08 15:41:06 +03:00
Anna Bodnia
36b263e230 fixes #3172 2017-06-08 12:19:47 +03:00
Kyle Shockey
6ccd037197 Merge branch 'bug/3163-markdown-xss' of github.com:shockey/swagger-ui into bug/3163-markdown-xss 2017-06-01 22:18:37 -07:00
Kyle Shockey
23b1a8aabd Finish rewiring Markdown provider 2017-06-01 21:41:28 -07:00
shockey
6ae7eb4591 Merge branch 'master' into bug/3163-markdown-xss 2017-06-01 09:47:12 -07:00
Kyle Shockey
df47e0e956 Disable HTML rendering in React-Markdown 2017-06-01 09:43:13 -07:00
Anna Bodnia
676fd99960 #3128 make request-body type default for aouth2 password flow 2017-05-31 18:53:45 +03:00
Anna Bodnia
8aebea34c4 add configuration of auth: scope separator, client id, client secret, app name, reaml, additionalQueryParams 2017-05-11 16:30:30 +03:00
Stefan Grootscholten
073eff4e10 Make the checkbox id more unique.
If the swagger.json defines more than one oauth2 Security scheme with
matching scopes, the id of the scope checkboxes were not unique.
As a result the scope for a second security scheme could not be
selected.

By adding the security scheme name to the id, it becomes more unique.
2017-05-04 09:39:22 +02:00
Anna Bodnia
bb73dd49d8 fixes password, application oauth2 flows 2017-04-26 17:50:09 +03:00
Anna Bodnia
5a260971cc fixes #2929 2017-04-21 13:29:18 +03:00
Anna Bodnia
84b408849d fixes #2929 2017-04-20 19:54:14 +03:00
Kyle Shockey
f2ae188722 Fix #2763 2017-04-10 13:50:51 -07:00
Mészáros Mihály
593e8de4c8 fix rm unintentieonaly staged file 2017-04-06 08:17:39 +02:00
Mészáros Mihály
ae33b7f46a Implement application/client_credentials flow 2017-04-05 20:20:23 +02:00
Anna Bodnia
432cd7f965 #2774 display scopes for oauth2 password flow 2017-03-30 17:49:32 +03:00
Kyle Shockey
e1fcbfbf09 Linter error fixes 2017-03-23 16:36:45 -07:00