-
Notifications
You must be signed in to change notification settings - Fork 14
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
shinyproxy user retrival #151
Conversation
In Shinyproxy environment the loged in user will be passed as an environmental variable instead of a session variable. Hence if the session is null added additional check for shinyproxy username
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #151 +/- ##
==========================================
- Coverage 31.40% 31.33% -0.07%
==========================================
Files 16 16
Lines 1433 1436 +3
==========================================
Hits 450 450
- Misses 983 986 +3 ☔ View full report in Codecov by Sentry. |
Thanks for the PR @arunkodati77!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the instructions. I was able to setup an instance with the application.yml
below
👍 It also works out-of-the-box when authentication: none
as it generates a random username hash
application.yml contents
proxy:
title: Open Analytics Shiny Proxy
logo-url: https://www.openanalytics.eu/shinyproxy/logo.png
landing-page: /
heartbeat-rate: 10000
heartbeat-timeout: 60000
port: 8080
authentication: simple
admin-groups: scientists
users:
- name: shinyproxy
password: 123
groups: scientists
- name: yada
password: 123
groups: scientists
specs:
- id: demo
display-name: Demo telemetry
description: To test
container-volumes: ["/path/to/valid/folder:/root/shiny/data"]
container-image: aruncoolprojects/demotelemetryshinyproxy
access-groups: [scientists]
logging:
file:
name: shinyproxy.log
I think there's a problem with the code as it will always return ""
when not deployed in shinyproxy.io
Sys.getenv("ANY_VARIABLE") will return "". Hence updated get_user() such that it will return NULL in non shinyproxy environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, can you add a bullet point item to the NEWS.md
files? (under "New Features")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🚀
In a ShinyProxy environment, the logged-in user will be automatically passed as an environmental variable instead of a session variable. Therefore, if the session is null, added an additional condition to check if username exists as an shinyproxy environmental variable using Sys.getenv("SHINYPROXY_USERNAME").
Follow this steps to test in shinyproxy environment:
docker pull aruncoolprojects/demotelemetryshinyproxy
Note: In container-volumes: ["<-path-to-your-local-folder>:/root/shiny/data"], Replace <-path-to-your-local-folder> with your local path such that you can see the telemetry logs.
Have you read the Contributing Guidelines?
Issue Fixed # As you can see first line has a username: shinyproxy (he is the user we configured in our application.yml)
Changes description
Clearly and concisely describe what's in this pull request. Include screenshots, if necessary.