Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
coco
Commits
2fb47003
Commit
2fb47003
authored
Apr 03, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
[Merge]
parents
f6be91a2
d70526bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
httpd.py
coco/httpd.py
+6
-0
requirements.txt
requirements/requirements.txt
+1
-1
No files found.
coco/httpd.py
View file @
2fb47003
...
@@ -161,6 +161,8 @@ class ProxyNamespace(BaseNamespace):
...
@@ -161,6 +161,8 @@ class ProxyNamespace(BaseNamespace):
logger
.
debug
(
"On token trigger"
)
logger
.
debug
(
"On token trigger"
)
token
=
message
.
get
(
'token'
,
None
)
token
=
message
.
get
(
'token'
,
None
)
secret
=
message
.
get
(
'secret'
,
None
)
secret
=
message
.
get
(
'secret'
,
None
)
user_id
=
message
.
get
(
'user'
,
None
)
self
.
current_user
=
self
.
app
.
service
.
get_user_profile
(
user_id
)
host
=
self
.
app
.
service
.
get_token_asset
(
token
)
.
json
()
host
=
self
.
app
.
service
.
get_token_asset
(
token
)
.
json
()
logger
.
debug
(
host
)
logger
.
debug
(
host
)
# {
# {
...
@@ -168,6 +170,10 @@ class ProxyNamespace(BaseNamespace):
...
@@ -168,6 +170,10 @@ class ProxyNamespace(BaseNamespace):
# "asset": {UUID},
# "asset": {UUID},
# "system_user": {UUID}
# "system_user": {UUID}
# }
# }
connection
=
str
(
uuid
.
uuid4
())
self
.
emit
(
'room'
,
{
'room'
:
connection
,
'secret'
:
secret
})
self
.
on_host
({
'secret'
:
secret
,
'uuid'
:
host
[
'asset'
],
'userid'
:
host
[
'system_user'
]})
self
.
on_host
({
'secret'
:
secret
,
'uuid'
:
host
[
'asset'
],
'userid'
:
host
[
'system_user'
]})
def
on_resize
(
self
,
message
):
def
on_resize
(
self
,
message
):
...
...
requirements/requirements.txt
View file @
2fb47003
...
@@ -20,7 +20,7 @@ Jinja2==2.10
...
@@ -20,7 +20,7 @@ Jinja2==2.10
jmespath==0.9.3
jmespath==0.9.3
jms-es-sdk==0.5.2
jms-es-sdk==0.5.2
jms-storage==0.0.12
jms-storage==0.0.12
jumpserver-python-sdk==0.0.3
5
jumpserver-python-sdk==0.0.3
6
MarkupSafe==1.0
MarkupSafe==1.0
oss2==2.4.0
oss2==2.4.0
paramiko==2.4.0
paramiko==2.4.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment