SciSpark / SciSpark

Scientific Spark - a NASA AIST14 project
http://scispark.jpl.nasa.gov/
83 stars 46 forks source link

Create function that reads in credential files #200

Closed kwhitehall closed 7 years ago

kwhitehall commented 7 years ago

For openDap services, some may require credentials. User shouldn't have to place these in the code. Instead, they should be able to place them in a file, and the code extracts username and pwd from the file. This functionality will be added to utils in a file OpenDapUtils? @rahulpalamuttam Thoughts on the location?

rahulpalamuttam commented 7 years ago

That sounds great @kwhitehall ! We could have a conf directory and keep the credentials file there.

kwhitehall commented 7 years ago

hrm.. given the Scala Java environment, resources associated with the jar, should be in the /resources folder. Are you suggesting /resources/config/ to place the default credentials for jar? My original statement was referring to what folder and file should we put the actual code to read the credentials from a file in. Note that if no string representing a path is entered when that function is called, the code would use the credentials in the resources folder by default.

rahulpalamuttam commented 7 years ago

@kwhitehall

  1. Yes Lets add this functionality to a file called OpenDapUtils
  2. I was actually suggesting a /conf directory in the base SciSpark directory. I think /resources/ should be for storing different datasets to play around with. In other projects like spark, zeppelin, mesos they have a specific conf directory for configuration files. These files usually contain xml, yaml, shell, or just plain text files that describe configuration properties.
kwhitehall commented 7 years ago

Ack'ed to the 1. /conf folder agreed, but I dont think the default file with the credentials should go in there. That should still be in resources... and the xml, yaml, etc. conf files related to the codebase should be in the top level conf/ folder [EDIT] New issue for this?

kwhitehall commented 7 years ago

This has been addressed in PR #201.

rahulpalamuttam commented 7 years ago

I was just looking at apache nutch's conf directory where all the config files including httpclient-auth.xml is placed. We don't have to follow the practice. I agree, we can keep it in resources. It wouldn't change much. Makes sense to keep it in resources for just the examples.

kwhitehall commented 7 years ago

Ack'ed. Closing this issue then. Feel free to open another one regarding the config folder.