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

Is there a way to force API Console to render a "password" input type #349

Closed
monikma opened this issue Oct 24, 2016 · 6 comments
Closed

Comments

@monikma
Copy link

monikma commented Oct 24, 2016

Hello

Down to the point:) Take a look here: http://www.w3schools.com/TAGS/att_input_type.asp at the "password" type description:

password - Defines a password field (characters are masked)

Is there any way to tell API Console that a field should be rendered as input of type "password" ? For example in this snippet:

/bla:
  post:
    body:
      application/x-www-form-urlencoded:
        formParameters:
          password:
            required: false
            type: string
            displayName: password

We need a way to mask the password field.

I could not find any property present in RAML specification that would say that the parameter should be of type "password". Are you maybe aware of any workaround to make it appear masked in API Console? Do you see a way of implementing it?

For us it is currently a security issue. I wonder if others stumbled upon similar issues.

Regards,
Monika Machunik

@monikma
Copy link
Author

monikma commented Oct 25, 2016

In other words, we need a mechanism to be able to mark an arbitrary field in RAML as "sensitive", so that it will be rendered masked in API Console.

Since there is no such keyword in RAML, do you see any possibility of adding such feature in API Console? For example someone could add a configuration to their API Console instance, where they would specify a naming convention for sensitive fields.

Do you maybe have similar configuration mechanism for any other features where we could have a look at, and perhaps try to extend it?

@sichvoge
Copy link
Contributor

sichvoge commented Mar 3, 2017

MH; maybe in the future we can introduce some annotations that are specific for rendering fields, something like:

/bla:
  post:
    body:
      application/x-www-form-urlencoded:
        properties:
          password:
            (field.type): password
            required: false
            type: string
            displayName: password

Just an idea though! :) We can leave that issue open and discuss ideas.

@jarrodek
Copy link
Contributor

jarrodek commented Jul 4, 2017

I support @sichvoge here. The only way to introduce different input types is to use annotations.

How definition for annotation would look like for (field.type)? Or maybe it should be:

(field):
  type: password

?

@sichvoge
Copy link
Contributor

sichvoge commented Jul 5, 2017

Sounds reasonable for me, but maybe we should just have (field.type): password which can be applied to any properties. What do you think?

An example:

application/json:
  type: object
  properties:
    password:
      type: string
      (field.type): password

@jarrodek
Copy link
Contributor

jarrodek commented Jul 5, 2017

Sorry for my previous comment. Wrong tab :)
I've deleted my post.

@jarrodek
Copy link
Contributor

I am against using annotations to control the view. This is not scalable as the only application that uses this information would be API Console. There is no corresponding mechanism for OAS which is also supported.
This should be incorporated into RAML and OAS specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants