From ea913a5b6e81190a7e6b7d36f7c4af77e242eded Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 9 Jul 2020 17:03:49 +0800 Subject: [PATCH 1/7] =?UTF-8?q?ci(build):=20=E4=BF=AE=E6=94=B9=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 23 ++++++++++++++++------- utils/build.sh | 14 +++++++++----- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6569db2a3..869955f17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,28 @@ -FROM registry.fit2cloud.com/public/python:v3 +FROM registry.fit2cloud.com/public/python:v3 as stage-build MAINTAINER Jumpserver Team +ARG VERSION +ENV VERSION=$VERSION WORKDIR /opt/jumpserver -RUN useradd jumpserver +ADD . . +RUN cd utils && bash -ixeu build.sh + + +FROM registry.fit2cloud.com/public/python:v3 +WORKDIR /opt/jumpserver +COPY --from=stage-build /opt/jumpserver/release/jumpserver /opt/jumpserver -COPY ./requirements /tmp/requirements +RUN useradd jumpserver RUN yum -y install epel-release && \ echo -e "[mysql]\nname=mysql\nbaseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql57-community-el6/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/mysql.repo -RUN cd /tmp/requirements && yum -y install $(cat rpm_requirements.txt) -RUN cd /tmp/requirements && pip install --upgrade pip setuptools && pip install wheel && \ - pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt || pip install -r requirements.txt + +COPY . . +RUN yum -y install $(cat requirements/rpm_requirements.txt) +RUN pip install --upgrade pip setuptools && pip install wheel && \ + pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements/requirements.txt || pip install -r requirements/requirements.txt RUN mkdir -p /root/.ssh/ && echo -e "Host *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null" > /root/.ssh/config -COPY . /opt/jumpserver RUN echo > config.yml VOLUME /opt/jumpserver/data VOLUME /opt/jumpserver/logs diff --git a/utils/build.sh b/utils/build.sh index 1cf6e9de8..4d23aa66b 100755 --- a/utils/build.sh +++ b/utils/build.sh @@ -5,15 +5,19 @@ utils_dir=$(pwd) project_dir=$(dirname "$utils_dir") release_dir=${project_dir}/release -# 安装依赖包 -command -v git || yum -y install git - # 打包 cd "${project_dir}" || exit 3 -rm -rf "${release_dir:?}/*" +rm -rf "${release_dir:?}"/* to_dir="${release_dir}/jumpserver" mkdir -p "${to_dir}" -git archive --format tar HEAD | tar x -C "${to_dir}" + +if [[ -d '.git' ]];then + command -v git || yum -y install git + git archive --format tar HEAD | tar x -C "${to_dir}" +else + cp -R . /tmp/jumpserver + mv -R /tmp/jumpserver/* "${to_dir}" +fi if [[ $(uname) == 'Darwin' ]];then alias sedi="sed -i ''" From f2c70d0bba70d027a03c7645592d3c1c34aec7b0 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 9 Jul 2020 17:18:40 +0800 Subject: [PATCH 2/7] =?UTF-8?q?ci(fix):=20=E4=BF=AE=E6=94=B9=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/build.sh b/utils/build.sh index 4d23aa66b..acf411a67 100755 --- a/utils/build.sh +++ b/utils/build.sh @@ -16,7 +16,7 @@ if [[ -d '.git' ]];then git archive --format tar HEAD | tar x -C "${to_dir}" else cp -R . /tmp/jumpserver - mv -R /tmp/jumpserver/* "${to_dir}" + mv /tmp/jumpserver/* "${to_dir}" fi if [[ $(uname) == 'Darwin' ]];then From 070af8c4919a1bf38c0ce98be9f1ec8c1a2cbdad Mon Sep 17 00:00:00 2001 From: BaiJiangJie <32935519+BaiJiangJie@users.noreply.github.com> Date: Thu, 16 Jul 2020 18:08:44 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix(radius):=20=E4=BF=AE=E5=A4=8Dradius?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98=20(#4342?= =?UTF-8?q?)=20(#4343)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(radius): 修复radius认证失败问题,添加get_django_user方法参数(django-radius==1.4.0 中添加了额外参数) * fix(radius): 修复radius认证失败问题,重写authenticate方法(django-radius 不接受public_key参数) --- apps/authentication/backends/radius.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/authentication/backends/radius.py b/apps/authentication/backends/radius.py index 2b193bbd0..6e39b2b79 100644 --- a/apps/authentication/backends/radius.py +++ b/apps/authentication/backends/radius.py @@ -11,7 +11,7 @@ User = get_user_model() class CreateUserMixin: - def get_django_user(self, username, password=None): + def get_django_user(self, username, password=None, *args, **kwargs): if isinstance(username, bytes): username = username.decode() try: @@ -27,6 +27,12 @@ class CreateUserMixin: user.save() return user + def authenticate(self, *args, **kwargs): + # 校验用户时,会传入public_key参数,父类authentication中不接受public_key参数,所以要pop掉 + # TODO:需要优化各backend的authenticate方法,django进行调用前会检测各authenticate的参数 + kwargs.pop('public_key', None) + return super().authenticate(*args, *kwargs) + class RadiusBackend(CreateUserMixin, RADIUSBackend): pass From 6e193842314762f1afe47c1077e2d2267acb995f Mon Sep 17 00:00:00 2001 From: BaiJiangJie <32935519+BaiJiangJie@users.noreply.github.com> Date: Fri, 17 Jul 2020 16:31:54 +0800 Subject: [PATCH 4/7] =?UTF-8?q?chore(readme):=20=E6=9B=B4=E6=96=B0README?= =?UTF-8?q?=20(#4359)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update README.md * Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96a9fbd47..ec380e969 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ JumpServer 采纳分布式架构,支持多机房跨区域部署,支持横向 ## 特色优势 -- 开源: 零门槛,线上快速获取和安装, 修复版本视情况而定; -, 修复版本视情况而定- 分布式: 轻松支持大规模并发访问; +- 开源: 零门槛,线上快速获取和安装; +- 分布式: 轻松支持大规模并发访问; - 无插件: 仅需浏览器,极致的 Web Terminal 使用体验; - 多云支持: 一套系统,同时管理不同云上面的资产; - 云端存储: 审计录像云端存储,永不丢失; From ea5b7cd921a616c70a39e46ca935bbfeab4d48b2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 21 Jul 2020 13:13:02 +0800 Subject: [PATCH 5/7] =?UTF-8?q?ci(github):=20=E6=B7=BB=E5=8A=A0=E9=80=9A?= =?UTF-8?q?=E7=94=A8action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/jms-generic-action-handler.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/jms-generic-action-handler.yml diff --git a/.github/workflows/jms-generic-action-handler.yml b/.github/workflows/jms-generic-action-handler.yml new file mode 100644 index 000000000..3f499cfb9 --- /dev/null +++ b/.github/workflows/jms-generic-action-handler.yml @@ -0,0 +1,12 @@ +on: [push, pull_request, release] + +name: JumpServer repos generic handler + +jobs: + generic_handler: + name: Run generic handler + runs-on: ubuntu-latest + steps: + - uses: jumpserver/action-generic-handler@master + env: + GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }} From 5b8fa1809c1b445f8f3062dfa8ca9039b34cdf38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=B9=BF?= Date: Fri, 21 Aug 2020 18:18:29 +0800 Subject: [PATCH 6/7] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs: 添加 developer wanted --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ec380e969..9868c7a55 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ [![Django](https://img.shields.io/badge/django-2.2-brightgreen.svg?style=plastic)](https://www.djangoproject.com/) [![Docker Pulls](https://img.shields.io/docker/pulls/jumpserver/jms_all.svg)](https://hub.docker.com/u/jumpserver) +|Developer Wanted| +|------------------| +|JumpServer 正在寻找开发者,一起为改变世界做些贡献吧,哪怕一点点,联系我 | + JumpServer 是全球首款开源的堡垒机,使用 GNU GPL v2.0 开源协议,是符合 4A 规范的运维安全审计系统。 JumpServer 使用 Python / Django 为主进行开发,遵循 Web 2.0 规范,配备了业界领先的 Web Terminal 方案,交互界面美观、用户体验好。 From a0085c4eab6a2188db3d596dfa702072e24ebf68 Mon Sep 17 00:00:00 2001 From: xinwen Date: Tue, 1 Sep 2020 16:15:59 +0800 Subject: [PATCH 7/7] =?UTF-8?q?feat(README):=20=E6=B7=BB=E5=8A=A0=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E7=89=88=E8=AF=95=E7=94=A8=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9868c7a55..326b50260 100644 --- a/README.md +++ b/README.md @@ -206,6 +206,10 @@ v2.1.0 是 v2.0.0 之后的功能版本。 - [完整文档](https://docs.jumpserver.org) - [演示视频](https://jumpserver.oss-cn-hangzhou.aliyuncs.com/jms-media/%E3%80%90%E6%BC%94%E7%A4%BA%E8%A7%86%E9%A2%91%E3%80%91Jumpserver%20%E5%A0%A1%E5%9E%92%E6%9C%BA%20V1.5.0%20%E6%BC%94%E7%A4%BA%E8%A7%86%E9%A2%91%20-%20final.mp4) +## JumpServer 企业版 +- [申请企业版试用](https://jinshuju.net/f/kyOYpi) +> 注:企业版支持离线安装,申请通过后会提供高速下载链接。 + ## 案例研究 - [JumpServer 堡垒机护航顺丰科技超大规模资产安全运维](https://blog.fit2cloud.com/?p=1147);