-
Notifications
You must be signed in to change notification settings - Fork 294
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
[FEATURE] Como un desarrollador, quiero no tener que dar mi cookie (o mi contraseña!) para tener acceso al API #5242
Comments
Sería mucho más sencillo implementar funciones de ese modo! Igualmente, en mi caso, el usuario ya no tendría que poner su contraseña a cada rato para realizar un envío o alguna otra acción. Bastaría con validar el API Token registrado la primera vez que se hiciese el login para proceder con lo demas |
lhchavez
added a commit
to lhchavez/omegaup
that referenced
this issue
Mar 21, 2021
Este cambio agrega la tabla de `API_Tokens` para poder autenticar ante el API sin necesidad de usar el cookie. Part of: omegaup#5242
lhchavez
added a commit
to lhchavez/omegaup
that referenced
this issue
Mar 21, 2021
Este cambio agrega la tabla de `API_Tokens` para poder autenticar ante el API sin necesidad de usar el cookie. Part of: omegaup#5242
lhchavez
added a commit
to lhchavez/omegaup
that referenced
this issue
Mar 21, 2021
Este cambio agrega la tabla de `API_Tokens` para poder autenticar ante el API sin necesidad de usar el cookie. Part of: omegaup#5242
lhchavez
added a commit
that referenced
this issue
Mar 21, 2021
Este cambio agrega la tabla de `API_Tokens` para poder autenticar ante el API sin necesidad de usar el cookie. Part of: #5242
lhchavez
added a commit
to lhchavez/omegaup
that referenced
this issue
Mar 22, 2021
Este cambio permite el uso de API Tokens para autenticarse ante el API. Para usarlos, se debe enviar una cabecera HTTP: Authorization: token 92d8c5a0eceef3c05f4149fc04b62bb2cd50d9c6 O si se desea interactuar mediante una identidad asociada, Authorization: token Credential=92d8c5a0eceef3c05f4149fc04b62bb2cd50d9c6,Username=groupname:username Existe un límite de 1000 peticiones por hora usando este mecanismo. Part of: omegaup#5242
lhchavez
added a commit
to lhchavez/omegaup
that referenced
this issue
Mar 22, 2021
Este cambio permite el uso de API Tokens para autenticarse ante el API. Para usarlos, se debe enviar una cabecera HTTP: Authorization: token 92d8c5a0eceef3c05f4149fc04b62bb2cd50d9c6 O si se desea interactuar mediante una identidad asociada, Authorization: token Credential=92d8c5a0eceef3c05f4149fc04b62bb2cd50d9c6,Username=groupname:username Existe un límite de 1000 peticiones por hora usando este mecanismo. Part of: omegaup#5242
lhchavez
added a commit
that referenced
this issue
Mar 22, 2021
Este cambio permite el uso de API Tokens para autenticarse ante el API. Para usarlos, se debe enviar una cabecera HTTP: Authorization: token 92d8c5a0eceef3c05f4149fc04b62bb2cd50d9c6 O si se desea interactuar mediante una identidad asociada, Authorization: token Credential=92d8c5a0eceef3c05f4149fc04b62bb2cd50d9c6,Username=groupname:username Existe un límite de 1000 peticiones por hora usando este mecanismo. Part of: #5242
lhchavez
added a commit
to lhchavez/omegaup
that referenced
this issue
Mar 22, 2021
Este cambio permite crear hasta 5 API tokens. También permite revocar tokens. Part of: omegaup#5242
lhchavez
added a commit
to lhchavez/omegaup
that referenced
this issue
Mar 22, 2021
Este cambio permite crear hasta 5 API tokens. También permite revocar tokens. Part of: omegaup#5242
lhchavez
added a commit
that referenced
this issue
Mar 22, 2021
Este cambio permite crear hasta 5 API tokens. También permite revocar tokens. Part of: #5242
lhchavez
added a commit
to lhchavez/omegaup
that referenced
this issue
Mar 22, 2021
Este cambio permite ver qué tokens han sido creados. Part of: omegaup#5242
lhchavez
added a commit
to lhchavez/omegaup
that referenced
this issue
Mar 22, 2021
Este cambio permite ver qué tokens han sido creados. Part of: omegaup#5242
This was referenced Mar 22, 2021
lhchavez
added a commit
that referenced
this issue
Mar 22, 2021
Este cambio permite ver qué tokens han sido creados. Part of: #5242
lhchavez
changed the title
[FEATURE] Como un desarrollador, quiero no tener que dar mi cookie para tener acceso al API
[FEATURE] Como un desarrollador, quiero no tener que dar mi cookie (o mi contraseña!) para tener acceso al API
Mar 22, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Comportamiento Esperado
Casi cualquier API te permite usar un token que no está asociado a tu login de la página. Esto es útil para gente que quiere interactuar con omegaUp desde CLI o CI.
Comportamiento Actual
El API espera que se le pase el cookie con el que inició sesión desde el navegador. si inicia sesión en otro navegador, esa cookie se invalida y se pierde acceso a la API.
Posible Solución
Hay que hacer otra tabla (APITokens) que guarde tokens que se pueden usar para la API. Y meterle rate-limiting y más logging a todas las APIs para contraatacar los inevitables accidentes (o abusos).
Cosas faltantes:
/api/user/login
[FEATURE] Eliminar/api/user/login
#5272Alternativas consideradas
Si no lo hacemos, la gente va a seguir usando workarounds dolorosos para todos los involucrados.
Contexto
El CI del comi seguido se muere por esto.
un usuario (@Apocryphon-X) está desarrollando un CLI para el API.
Tu ambiente
N/A.
The text was updated successfully, but these errors were encountered: