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

Update Jupyter config to new Cloud Shell domain. #2172

Merged
merged 1 commit into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions containers/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ENV PYTHON_3_ENV py3env
SHELL ["/bin/bash", "-c"]

# Setup OS and core packages
RUN echo "deb-src http://ftp.us.debian.org/debian testing main" >> /etc/apt/sources.list && \
RUN echo "deb-src http://ftp.us.debian.org/debian stretch main" >> /etc/apt/sources.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EF0F382A1A7B6500 04EE7237B7D453EC && \
apt-get update -y && \
apt-get install -y -q debian-archive-keyring debian-keyring && \
apt-get update -y && \
Expand Down Expand Up @@ -94,7 +95,7 @@ RUN echo "deb-src http://ftp.us.debian.org/debian testing main" >> /etc/apt/sour
plotly==1.12.5 \
psutil==4.3.0 \
pygments==2.1.3 \
python-dateutil==2.5.0 \
python-dateutil==2.8.1 \
python-snappy==0.5.1 \
pytz==2018.4 \
pyyaml==3.13 \
Expand All @@ -103,10 +104,10 @@ RUN echo "deb-src http://ftp.us.debian.org/debian testing main" >> /etc/apt/sour
scikit-image==0.13.0 \
scikit-learn==0.19.1 \
scipy==1.0.0 \
seaborn==0.7.0 \
seaborn==0.9.0 \
six==1.11.0 \
statsmodels==0.8.0 \
sympy==0.7.6.1 \
sympy==1.1.1 \
tornado==4.5.1 \
widgetsnbextension==3.2.1 \
xgboost==0.6a2 && \
Expand Down Expand Up @@ -148,23 +149,24 @@ RUN echo "deb-src http://ftp.us.debian.org/debian testing main" >> /etc/apt/sour
pandas-gbq==0.3.0 \
pandas==0.22.0 \
pandocfilters==1.4.2 \
parso==0.7.0 \
pillow==5.0.0 \
pip==18.0 \
plotly==1.12.5 \
psutil==4.3.0 \
pygments==2.1.3 \
python-dateutil==2.5.0 \
python-dateutil==2.8.1 \
python-snappy==0.5.1 \
pytz==2018.4 \
pyzmq==17.1.0 \
requests==2.18.4 \
scikit-image==0.13.0 \
scikit-learn==0.19.1 \
scipy==1.0.0 \
seaborn==0.7.0 \
seaborn==0.9.0 \
six==1.11.0 \
statsmodels==0.8.0 \
sympy==0.7.6.1 \
sympy==1.1.1 \
tornado==4.5.1 \
widgetsnbextension==3.2.1 \
xgboost==0.6a2 && \
Expand Down
2 changes: 1 addition & 1 deletion containers/base/license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ do
if [[ " ${INSTALLED_PACKAGES[@]} " =~ " ${col1} " ]]; then
wget -O $2/$col1.LICENSE $col2
if [[ "${col3}" == *GPL* ]]; then
pip install -t "$2/source/${col1}" ${col1}
pip download -d "$2/source/${col1}" ${col1}
fi
fi
done < $1
37 changes: 21 additions & 16 deletions containers/base/third_party_licenses.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ python-editor,https://raw.githubusercontent.com/fmoo/python-editor/master/LICENS
tzlocal,https://raw.githubusercontent.com/regebro/tzlocal/master/LICENSE.txt,MIT
itsdangerous,https://raw.githubusercontent.com/pallets/itsdangerous/master/LICENSE.rst,3-Clause BSD
Werkzeug,https://raw.githubusercontent.com/pallets/werkzeug/master/LICENSE.rst,3-Clause BSD
click,https://raw.githubusercontent.com/pallets/click/master/LICENSE,3-Clause BSD
click,https://raw.githubusercontent.com/pallets/click/master/LICENSE.rst,3-Clause BSD
alembic,https://raw.githubusercontent.com/zzzeek/alembic/master/LICENSE,MIT
sqlalchemy,https://raw.githubusercontent.com/zzzeek/sqlalchemy/master/LICENSE,MIT
APScheduler,https://raw.githubusercontent.com/agronholm/apscheduler/master/LICENSE.txt,MIT
Flask,https://raw.githubusercontent.com/pallets/flask/master/LICENSE,3-Clause BSD
Flask,https://raw.githubusercontent.com/pallets/flask/master/LICENSE.rst,3-Clause BSD
chainerui,https://raw.githubusercontent.com/chainer/chainerui/master/LICENSE,MIT
chainercv,https://raw.githubusercontent.com/chainer/chainercv/master/LICENSE,MIT
pyglet,https://raw.githubusercontent.com/adamlwgriffiths/Pyglet/master/LICENSE,3-Clause BSD
Expand Down Expand Up @@ -40,7 +40,7 @@ pexpect,https://raw.githubusercontent.com/pexpect/pexpect/ab7d99a670794fc2b03654
setuptools,https://raw.githubusercontent.com/pypa/setuptools/master/LICENSE,MIT
tornado,https://raw.githubusercontent.com/tornadoweb/tornado/stable/LICENSE,Apache Software License 2.0
traitlets,https://raw.githubusercontent.com/ipython/traitlets/master/COPYING.md,BSD
subprocess32,https://raw.githubusercontent.com/google/python-subprocess32/master/LICENSE,Python Software Foundation License
subprocess32,https://raw.githubusercontent.com/google/python-subprocess32/main/LICENSE,Python Software Foundation License
jinja2,https://raw.githubusercontent.com/pallets/jinja/master/LICENSE,BSD
html5lib,https://raw.githubusercontent.com/html5lib/html5lib-python/master/LICENSE,MIT
opencv-python,https://raw.githubusercontent.com/skvark/opencv-python/master/LICENSE.txt,MIT
Expand Down Expand Up @@ -87,14 +87,14 @@ funcsigs,https://raw.githubusercontent.com/aliles/funcsigs/master/LICENSE,Apache
gapic-google-cloud-pubsub-v1,https://raw.githubusercontent.com/googleapis/api-client-staging/master/generated/python/gapic-google-cloud-pubsub-v1/LICENSE,Apache 2.0
google-apitools,https://raw.githubusercontent.com/google/apitools/master/LICENSE,Apache 2.0
google-auth-library-python-httplib2,https://raw.githubusercontent.com/GoogleCloudPlatform/google-auth-library-python-httplib2/master/LICENSE,Apache 2.0
google-cloud-bigquery,https://raw.githubusercontent.com/GoogleCloudPlatform/google-cloud-python/master/bigquery/LICENSE,Apache 2.0
google-cloud-core,https://raw.githubusercontent.com/GoogleCloudPlatform/google-cloud-python/master/core/LICENSE,Apache 2.0
google-cloud-pubsub,https://raw.githubusercontent.com/GoogleCloudPlatform/google-cloud-python/master/pubsub/LICENSE,Apache 2.0
google-cloud-bigquery,https://raw.githubusercontent.com/googleapis/google-cloud-python/master/LICENSE,Apache 2.0
google-cloud-core,https://raw.githubusercontent.com/googleapis/google-cloud-python/master/LICENSE,Apache 2.0
google-cloud-pubsub,https://raw.githubusercontent.com/googleapis/google-cloud-python/master/LICENSE,Apache 2.0
google-gax,https://raw.githubusercontent.com/googleapis/gax-python/master/LICENSE,Apache 2.0
googleapis-common-protos,https://raw.githubusercontent.com/googleapis/api-common-protos/master/LICENSE,Apache 2.0
googledatastore,https://raw.githubusercontent.com/GoogleCloudPlatform/google-cloud-datastore/master/LICENSE,Apache 2.0
googledatastore,https://raw.githubusercontent.com/googleapis/google-cloud-python/master/LICENSE,Apache 2.0
hdfs,https://github.com/mtth/hdfs/blob/master/LICENSE,MIT
idna,https://raw.githubusercontent.com/kjd/idna/master/LICENSE.rst,BSD-like
idna,https://raw.githubusercontent.com/kjd/idna/master/LICENSE.md,BSD-like
Markdown,https://raw.githubusercontent.com/Python-Markdown/markdown/master/LICENSE.md,BSD
monotonic,https://raw.githubusercontent.com/atdt/monotonic/master/LICENSE,Apache 2.0
oauth2client,https://raw.githubusercontent.com/google/oauth2client/master/LICENSE,Apache 2.0
Expand All @@ -121,11 +121,11 @@ PyJWT,https://raw.githubusercontent.com/jpadilla/pyjwt/master/LICENSE,MIT
requests-oauthlib,https://raw.githubusercontent.com/requests/requests-oauthlib/master/LICENSE,BSD
retrying,https://raw.githubusercontent.com/rholder/retrying/master/LICENSE,Apache 2.0
websocket-client,https://raw.githubusercontent.com/websocket-client/websocket-client/master/LICENSE,LGPL
enum34,https://bitbucket.org/stoneleaf/enum34/raw/f24487b45cd041fc9406d67441d2186ac70772b7/enum/LICENSE,BSD
enum34,https://raw.githubusercontent.com/GoodRx/enum34/master/enum/LICENSE,BSD
futures,https://raw.githubusercontent.com/agronholm/pythonfutures/master/LICENSE,PSF
backports-abc,https://raw.githubusercontent.com/cython/backports_abc/master/LICENSE,PSF
backports.shutil-get-terminal-size,https://raw.githubusercontent.com/chrippa/backports.shutil_get_terminal_size/master/LICENSE,MIT
configparser,https://bitbucket.org/ambv/configparser/raw/78998f2ded2e840376adc712337545014fa9b622/README.rst,MIT
configparser,https://raw.githubusercontent.com/jaraco/configparser/master/LICENSE,MIT
crcmod,https://raw.githubusercontent.com/gsutil-mirrors/crcmod/master/LICENSE,MIT
decorator,https://raw.githubusercontent.com/micheles/decorator/master/LICENSE.txt,2-Clause BSD
entrypoints,https://raw.githubusercontent.com/takluyver/entrypoints/master/LICENSE,MIT
Expand All @@ -134,10 +134,10 @@ functools32,https://raw.githubusercontent.com/michilu/python-functools32/master/
grpc-google-iam-v1,https://raw.githubusercontent.com/googleapis/googleapis/master/LICENSE,Apache 2.0
ipython-genutils,https://raw.githubusercontent.com/ipython/ipython_genutils/master/COPYING.md,BSD
ipywidgets,https://raw.githubusercontent.com/jupyter-widgets/ipywidgets/master/LICENSE,3-Clause BSD
Jinja2,https://raw.githubusercontent.com/pallets/jinja/master/LICENSE,BSD
Jinja2,https://raw.githubusercontent.com/pallets/jinja/master/LICENSE.rst,BSD
jsonschema,https://raw.githubusercontent.com/Julian/jsonschema/master/COPYING,MIT
jupyter,https://raw.githubusercontent.com/jupyter/notebook/master/COPYING.md,BSD
notebook,https://raw.githubusercontent.com/jupyter/notebook/master/COPYING.md,BSD
jupyter,https://raw.githubusercontent.com/jupyter/notebook/master/LICENSE,BSD
notebook,https://raw.githubusercontent.com/jupyter/notebook/master/LICENSE,BSD
jupyter-client,https://raw.githubusercontent.com/jupyter/jupyter_client/master/COPYING.md,BSD
jupyter-console,https://raw.githubusercontent.com/jupyter/jupyter_console/master/COPYING.md,BSD
jupyter-core,https://raw.githubusercontent.com/jupyter/jupyter_core/master/COPYING.md,BSD
Expand All @@ -160,7 +160,7 @@ simplegeneric,https://opensource.org/licenses/ZPL-2.0,ZPL 2.1
singledispatch,https://opensource.org/licenses/MIT,MIT
tensorflow-model-analysis,https://github.com/tensorflow/model-analysis/blob/master/LICENSE,Apache 2.0
terminado,https://raw.githubusercontent.com/jupyter/terminado/master/LICENSE,BSD
wcwidth,https://raw.githubusercontent.com/jquast/wcwidth/master/LICENSE.txt,MIT
wcwidth,https://raw.githubusercontent.com/jquast/wcwidth/master/LICENSE,MIT
widgetsnbextension,https://raw.githubusercontent.com/jupyter-widgets/ipywidgets/master/widgetsnbextension/LICENSE,BSD
pandas,https://raw.githubusercontent.com/pandas-dev/pandas/master/LICENSE,3-Clause BSD
scikit-learn,https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/COPYING,BSD
Expand All @@ -178,10 +178,10 @@ PySocks,https://raw.githubusercontent.com/Anorov/PySocks/master/LICENSE,BSD
ruamel-yaml,https://bitbucket.org/ruamel/yaml/raw/1364db82e3ad5680351e8a96323fa74ef9e662da/LICENSE,MIT
apache-airflow,https://raw.githubusercontent.com/apache/incubator-airflow/master/LICENSE,Apache 2.0
backports.functools-lru-cache,https://raw.githubusercontent.com/jaraco/backports.functools_lru_cache/master/LICENSE,MIT
backports.ssl-match-hostname,https://bitbucket.org/brandon/backports.ssl_match_hostname/raw/76440258eb5e2aaac7c6f3d0b0a5afdbe335a502/LICENSE.txt,PSF
backports.ssl-match-hostname,https://raw.githubusercontent.com/exoscale/pkg-backports.ssl-match-hostname/precise/debian/copyright,PSF
beautifulsoup4,https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/download/head:/copying-20110228012957-7ptf6yxua0sj3vhn-1/LICENSE,MIT
blinker,https://raw.githubusercontent.com/jek/blinker/master/LICENSE,MIT
bokeh,https://raw.githubusercontent.com/bokeh/bokeh/master/LICENSE.txt,3-Clause BSD
bokeh,https://raw.githubusercontent.com/bokeh/bokeh/main/LICENSE.txt,3-Clause BSD
brewer2mpl,https://raw.githubusercontent.com/jiffyclub/palettable/master/license.txt,MIT
bs4,https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/download/head:/copying-20110228012957-7ptf6yxua0sj3vhn-1/LICENSE,MIT
Click,https://raw.githubusercontent.com/pallets/click/master/LICENSE.rst,BSD
Expand Down Expand Up @@ -252,3 +252,8 @@ zict,https://raw.githubusercontent.com/dask/zict/master/LICENSE.txt,BSD
zope.deprecation,https://raw.githubusercontent.com/zopefoundation/zope.deprecation/master/LICENSE.txt,ZPL
google-cloud-dataflow,https://raw.githubusercontent.com/apache/beam/master/LICENSE,Apache 2.0
soupsieve,https://raw.githubusercontent.com/facelessuser/soupsieve/master/LICENSE.md,MIT
gmpy2,https://raw.githubusercontent.com/aleaxit/gmpy/master/COPYING,LGPL
HeapDict,https://raw.githubusercontent.com/DanielStutzbach/heapdict/master/LICENSE,BSD
mpmath,https://raw.githubusercontent.com/fredrik-johansson/mpmath/master/LICENSE,BSD
natsort,https://raw.githubusercontent.com/SethMMorton/natsort/master/LICENSE,MIT
smmap,https://raw.githubusercontent.com/gitpython-developers/smmap/master/LICENSE,BSD
2 changes: 1 addition & 1 deletion sources/web/datalab/config/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"--no-browser",
"--log-level=DEBUG",
"--debug",
"--NotebookApp.allow_origin_pat=\".*-dot-devshell.appspot.com$\"",
"--NotebookApp.allow_origin_pat=\"(.*-dot-devshell[.]appspot[.]com$)|(.*[.]cloudshell[.]dev$)\"",
"--NotebookApp.log_format=\"%(message)s\"",
"--NotebookApp.token=",
"--Session.key=b'\"\"'",
Expand Down
4 changes: 4 additions & 0 deletions sources/web/datalab/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ function stopVmHandler(request: http.ServerRequest, response: http.ServerRespons

function requestIsCrossOrigin(request: http.ServerRequest) {
if (request.headers.origin) {
// Explicitly whitelist Cloud Shell's domain for cross-origin requests.
if (url.parse(request.headers.origin).host.endsWith('.cloudshell.dev')) {
return false;
}
return url.parse(request.headers.origin).host !== request.headers.host;
} else if (request.headers.referer) {
return url.parse(request.headers.referer).host !== request.headers.host;
Expand Down