node-slack-sdk icon indicating copy to clipboard operation
node-slack-sdk copied to clipboard

Password Input type not supported on slack

Open Robby29 opened this issue 8 years ago • 21 comments

Description

Describe your issue here. We are trying to take passwords as inputs from users on slack while chatting with our chatbot, but there seems to be no supporting functionality for that. I have googled a lot about this with no luck. So if someone can let me know whether this is functionality is supported on slack or not and are there any plans to enable it in the future.

What type of issue is this? (place an x in one of the [ ])

  • [ ] bug
  • [x] enhancement (feature request)
  • [x] question
  • [ ] documentation related
  • [ ] testing related
  • [ ] discussion

Requirements (place an x in each of the [ ])

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

@slack/client version:

node version: All versions

OS version(s): SUSE 11.2 Linux

Steps to reproduce:

1. 2. 3.

Expected result:

What you expected to happen

Actual result:

What actually happened

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

Robby29 avatar Aug 08 '18 09:08 Robby29

This is more of a question about the Slack API than it is about the node SDK (for the API). In the future, I'd recommend looking into the wonderful API community and official Developer Support with questions about the API.


I'm guessing this type of functionality is unsupported because Slack doesn't want to be responsible for securely transferring passwords to API consumers/users. Maybe look for a different way of implementing your app.

I don't know what your use case is, but hopefully this recommendation might shed some light: If you're trying to auth a Slack user and connect them to a user on your service, I'd recommend looking into Sign in with Slack. It's essentially an easy way to link Slack users with users of your service.

clavin avatar Aug 08 '18 18:08 clavin

On principle, I don't think there's anything wrong with sending secure information over Slack (all user data is handled with security controls). However, most software treat passwords as so sensitive that they don't even appear on a screen (masked with **** in UI controls instead of the text). Slack doesn't currently have a support for this masking, but I'd be happy to bring your feedback to the team. My instinct is that masked fields aren't likely to be added to the platform soon.

I'd like to learn more about what your chatbot is doing before I make a recommendation on how to handle this. Is your bot taking passwords as input because that password has to be forwarded onto some other system?

aoberoi avatar Aug 08 '18 23:08 aoberoi

@clavin and @aoberoi : thanks for the reply guys.

Just to provide more info on what I am trying to achieve here. My chatbot collects information from user in form of various dialogs (more like what we usually would do in a html form ) and in the final dialog I append all the inputs in a post request (JSON format) and make a call to one of my API's hosted on a different server. The API basically runs an installation of a particular software , which requires a username and password for its installation. SO I dont wan the password types by the user to be visible in plain text on the screen.

As Ankur said that there are no features supporting masked fields in slack as of now so can you guys suggest some other way to achieve this.

Thanks much.

Robby29 avatar Aug 09 '18 08:08 Robby29

The best option I can think of would be semi-painful to implement, but here's what I'm thinking:

You generate a nonce of some sort and store data about the action that must be performed associated to that nonce in a database. You should probably save its creation time so that you can expire this nonce after a certain timeout.

When you need the password from the user, you send them a link to a URL with the nonce included. An example would be https://my.app/installs/authorize?id=xxxxx (where xxxxx is the nonce).

When a request comes to that URL, you serve a page with an HTML form that has the required fields, such as username and password. In this form, you are free to use the <input type="password" /> HTML tag, so that the input is masked. You also render the nonce into the value of a hidden input.

When the form is submitted by the user, you validate the inputs (lookup the nonce to find the other details of the operation, check that the operation has not timed out, etc), then kick off the remote installation. Remove the entry for this operation from your database.

Just before you delete the data, you can send the Slack user a confirmation message. Just remember to store enough information in your database (such as the user ID).

aoberoi avatar Aug 31 '18 22:08 aoberoi

feel free to continue discussion in this issue, however i'm going to close it because its not an issue that we can resolve through this package alone.

aoberoi avatar Aug 31 '18 22:08 aoberoi

Thanks a lot Ankur for the suggestion. I like your solution but I guess it will not be a good experience for the user to have to navigate to another page for keying in the password. Though honestly at this point it seems to be the most viable solution. I will give it a shot and also look at OAuth as an alternative.

Cheers!!

Robby29 avatar Sep 24 '18 11:09 Robby29

Was the functionality of data masking ever added to the Slack API?

theodore-koch avatar Sep 09 '19 20:09 theodore-koch

I'm also looking for same feature. It'll be great to have

rahulkumar993 avatar Jun 01 '20 13:06 rahulkumar993

+1

sankareds avatar Sep 29 '20 15:09 sankareds

Yes please 🤞

kezike avatar Mar 25 '21 09:03 kezike

+1.

The real request here is for a text box which doesn't display information typed into it. Not for slack to take ownership of secure transmission of sensitive data. A warning about this within the API would be sufficient to protect slack from any potential legal backlash of leaked information. It is currently and always has been on the user to securely handle their own info.

Eagerly awaiting this feature :)

DuTogira avatar Jul 07 '21 20:07 DuTogira

+1

szugasti avatar Aug 09 '21 21:08 szugasti

+1

vxe avatar Aug 18 '21 15:08 vxe

+1

MaximeHussenet avatar Nov 03 '21 20:11 MaximeHussenet

+1

marcelmongs avatar Jan 18 '22 15:01 marcelmongs

I added a plain text input

image

I changed plain_text_input to anything that is undefined. It shows correct types in the tooltip and says "Must be one of one". I can see the type of password in that tooltip.

image

However, when I use the password type, Is says "Invalid_element.".

image

So, was it implemented? Or, am I making a mistake? Thanks.

bbilginn avatar Mar 01 '22 08:03 bbilginn

@bbilginn Unfortunately, still the password type block element does not exist, and we don't have any updates on this.

seratch avatar Mar 01 '22 08:03 seratch

@seratch Just want to double confirm: is there any plan to support the feature of masking the characters when they are typed into the input box?

Wusong-Fang avatar Dec 23 '23 05:12 Wusong-Fang

Was the functionality of data masking ever added to the Slack API?

SujayST avatar Jan 09 '24 12:01 SujayST

Also want this

jbwc avatar Jan 10 '24 22:01 jbwc