Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

how can I enable username/password auth ? #167

Closed
fallshuang opened this issue Apr 17, 2019 · 8 comments
Closed

how can I enable username/password auth ? #167

fallshuang opened this issue Apr 17, 2019 · 8 comments
Labels

Comments

@fallshuang
Copy link

I start theia in docker , how can I enable username/password auth ?

@marcdumais-work
Copy link
Member

Hi @fallshuang ,

Since Theia applications can be used natively (i.e. run directly on one's computer, where the user has already authenticated), we do not consider user authentication to be in-scope, but rather as something to be dealt-with outside of Theia, if/when required. For example workspace servers that integrate Theia, such as Eclipse Che and Gitpod, will take care of this.

@land007
Copy link

land007 commented Apr 19, 2019

If you want to use your username and password to enhance your security, you can use the following command, where the password needs to be filled with MD5.

docker rm -f theia; docker run -it --privileged -p 15050:5050 --expose 9229 -p 19229:9229 -v "$(pwd):/home/project:cached" -e "username=land007" -e "password=fcea920f7412b5da7be0cf42b8c93759" --name theia land007/theia:latest

Please visit http://docker_ip:15050/ and log in with username land007 and password 1234567

@marcdumais-work
Copy link
Member

marcdumais-work commented Apr 22, 2019

Thanks @land007 : this seems like a simple way to enable some form of authentication.

@stale
Copy link

stale bot commented Jul 16, 2019

This contribution has been automatically marked as stale due to inactivity, and it will be closed if no further activity occurs. Thank you for contributing to Theia!

@stale stale bot added the stale label Jul 16, 2019
@stale stale bot closed this as completed Aug 15, 2019
@Jayuda
Copy link

Jayuda commented Apr 12, 2020

Sorry @land007, i have try your suggestions but not working.
Any update ?

@land007
Copy link

land007 commented Apr 12, 2020

@Jayuda You may be mapping directory error, please try the following command

docker run -it --privileged -p 15050:5050 --expose 9229 -p 19229:9229 -e "username=land007" -e "password=fcea920f7412b5da7be0cf42b8c93759" --name theia land007/theia:latest

@DilLip-Chowdary-Codes
Copy link

DilLip-Chowdary-Codes commented Jan 29, 2021

I start theia in docker , how can I enable username/password auth ?

I Have done it using theia-https Refer Below Link

https://github.com/DilLip-Chowdary-Codes/Theia_Authentication_Integrated

@land007
Copy link

land007 commented Feb 7, 2021

You can also use the original mirror to do https and username password

version: "2.1"
networks:
  internal_network:
services:
  theia:
    restart: always
    networks:
      - internal_network
    image: theiaide/theia:latest
    container_name: theia
    volumes:
      - ./project:/home/project:cached
    logging:
      driver: "json-file"
      options:
        max-size: "300k"
        max-file: "3"
    expose:
      - "3000"
  theia_http-proxy:
    restart: always
    networks:
      - internal_network
    links:
      - theia
    image: land007/http-proxy:latest
    container_name: theia_http-proxy
    volumes:
      - ./cert/www.****.com_chain.crt:/node/cert/www.****.com_chain.crt
      - ./cert/www.****.com_key.key:/node/cert/www.****.com_key.key
    logging:
      driver: "json-file"
      options:
        max-size: "300k"
        max-file: "3"
    environment:
      - "password=fcea920f7412b5da7be0cf42b8c93759"
      - "DOMAIN_NAME=www.****.com"
      - "http_proxy_domains="
      - "http_proxy_paths=/"
      - "http_proxy_hosts=theia"
      - "http_proxy_ports=3000"
      - "http_proxy_pretends=false"
      - "ws_proxy_domains="
      - "ws_proxy_paths=/"
      - "ws_proxy_hosts=theia"
      - "ws_proxy_ports=3000"
    expose:
      - "20022"
      - "8443"
      - "443"
      - "80"
    ports:
      - "443:443"

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

No branches or pull requests

5 participants