Skip to content
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

Script param #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Script param #63

wants to merge 2 commits into from

Conversation

evenhuis
Copy link

Replacing hard-coded variables in scripts

Issue

  • storing username and passwords in the script or in credentials. txt are real security risk:

    • many OMERO servers use LDAP so the name username/password is single-sign for whole institution
    • storing passwords in plain text is poor practice
    • high risk of committing a file with username +password to a GitHub repo
  • Less reuse of script of each script needs to be altered for user, imageID etc

Fix

Use the #@parameter script function in ImageJ:

  • very easy way to add a dialog box
  • Sensible defaults with value=
  • style='password' keeps the password secure
  • previous inputs replace the default (this saves a lot of typing)

Screen Shot 2019-03-21 at 12 02 12 am

If this is good solution I'll change the rest of the scripts in the examples.

Cheers,

Chris

@jburel
Copy link
Member

jburel commented Mar 20, 2019

Thanks @evenhuis. This option will work. We only use the name and password in the script solely for convenience during the training session, and we did not recommend to use that approach for general usage
The diff of
1d97e50
does not look right.

If you want to change the other scripts that will be great.

@evenhuis
Copy link
Author

Hi @jburel,

Thanks, I’ll have a go at changing the rest of the scripts when I get a chance.

Let me know if there’s any examples handling password better. Except for some python/jupyter codes using get pass, I couldn’t find anything.

The diff you mention is new file. In the script editor I have it doesn’t recognize the ‘.jy’ so the scripts appear as plain text and can’t be executed. Setting the language to python changes the extension to ‘.py’.

I think if would be easier to change the extensions to ‘.py’.

Thanks,

Chris

@jburel
Copy link
Member

jburel commented Mar 21, 2019

sorry I missed the extension. Which version of Fiji are you using? I never had that problem with the script editor

@pwalczysko
Copy link
Member

This issue was raised during Oxford workshop again by the attendees.

@jburel jburel closed this Nov 9, 2019
@jburel jburel reopened this Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants