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

Add /login /logout and cookies for ID in rest server #205

Closed
ethanfrey opened this issue Aug 3, 2017 · 3 comments
Closed

Add /login /logout and cookies for ID in rest server #205

ethanfrey opened this issue Aug 3, 2017 · 3 comments

Comments

@ethanfrey
Copy link
Contributor

Let's make this behave a bit more like a normal server....

Server on startup generates a temporary secret

On /login, server tries to access the named key, if successful, it adds a cookie, which is some encrypted Form of the name and password.

On /sign we no longer need to use a name password envelope, just refer to the cookie. This also makes the whole api more standard and /send simpler.

On /logout we unset the cookie.

All cookies will become invalid as soon as the server restarts as there is a new secret, maybe one could add more expiration info as well.

@ethanfrey
Copy link
Contributor Author

Well, actually cookies is probably a bad idea for security. But generate this encrypted token and return it on login. It can be passed in to the rest server via a X-Auth: <token> header. If the current process is to store the name/password in memory on the ui app, this is likely more secure (as you would have to grab the token from one app and the key from the other).

@ebuchman
Copy link
Member

#324

@zramsay
Copy link
Contributor

zramsay commented Feb 2, 2018

supeseded by #324

@zramsay zramsay closed this as completed Feb 2, 2018
ParthDesai pushed a commit to ChorusOne/cosmos-sdk that referenced this issue Apr 19, 2021
yihuang added a commit to yihuang/cosmos-sdk that referenced this issue Mar 23, 2024
add basic support in sdk:
- add a TxExecutor baseapp option
- add TxIndex/TxCount/MsgIndex in context

Update CHANGELOG.md

Signed-off-by: yihuang <[email protected]>

fix misspell

fix lint

run gci

fix lint

gci seems not compatible with gofumpt
dudong2 referenced this issue in b-harvest/cosmos-sdk Oct 17, 2024
add basic support in sdk:
- add a TxExecutor baseapp option
- add TxIndex/TxCount/MsgIndex in context

Update CHANGELOG.md

Signed-off-by: yihuang <[email protected]>

fix misspell

fix lint

run gci

fix lint

gci seems not compatible with gofumpt
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Dec 12, 2024
add basic support in sdk:
- add a TxExecutor baseapp option
- add TxIndex/TxCount/MsgIndex in context

Update CHANGELOG.md

Signed-off-by: yihuang <[email protected]>

fix misspell

fix lint

run gci

fix lint

gci seems not compatible with gofumpt
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Dec 12, 2024
add basic support in sdk:
- add a TxExecutor baseapp option
- add TxIndex/TxCount/MsgIndex in context

Update CHANGELOG.md

Signed-off-by: yihuang <[email protected]>

fix misspell

fix lint

run gci

fix lint

gci seems not compatible with gofumpt
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Dec 16, 2024
add basic support in sdk:
- add a TxExecutor baseapp option
- add TxIndex/TxCount/MsgIndex in context

Update CHANGELOG.md

Signed-off-by: yihuang <[email protected]>

fix misspell

fix lint

run gci

fix lint

gci seems not compatible with gofumpt
mmsqe pushed a commit to mmsqe/cosmos-sdk that referenced this issue Dec 16, 2024
add basic support in sdk:
- add a TxExecutor baseapp option
- add TxIndex/TxCount/MsgIndex in context

Update CHANGELOG.md

Signed-off-by: yihuang <[email protected]>

fix misspell

fix lint

run gci

fix lint

gci seems not compatible with gofumpt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants