Skip to content

Added Security Measures#68

Open
githubofakash wants to merge 5 commits intoShoonya-Dev:masterfrom
githubofakash:master
Open

Added Security Measures#68
githubofakash wants to merge 5 commits intoShoonya-Dev:masterfrom
githubofakash:master

Conversation

@githubofakash
Copy link
Copy Markdown

Implemented data access using environment variables (load_dotenv library) in order to secure users confidential information

pyotp library for automatic totp fetching while logging in
load_dotenv library for fetching environment variable data(secure storage of user credentials)
add environment variables to securely store and access users credentials
add automated 2factor otp generation for logging in
user = <uid>
pwd = <password>
#create .env file to securely access user credentials in program
load_dotenv('/home/akash/Documents/Projects/.env')
Copy link
Copy Markdown

@TheCodeArtist TheCodeArtist Nov 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not hardcode stuff from your local setup.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even it better if it can initialize from user env. that means system variable

what do you think

Copy link
Copy Markdown

@softashu softashu Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that way
pwd = os.getenv('shoonya_api_pwd')

vc = os.getenv('vendor_code')
app_key = os.getenv('api_key')
imei = <imei>
factor2 = otp
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of pushing commits with issues and separate commits to fix them,
please consider rebasing your changes into logical commits.

#create .env file to securely access user credentials in program
load_dotenv('/home/akash/Documents/Projects/.env')

#totp from shoonya dashboard security totp section
Copy link
Copy Markdown

@TheCodeArtist TheCodeArtist Nov 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear what this is referring to.

Is this suggesting to fetch the value of totp from some webpage/URL?
If yes, maybe mention the exact details here.
(including a format/template of what a value looks like.

Copy link
Copy Markdown

@TheCodeArtist TheCodeArtist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if Shoonya-Dev accepts PRs.

However, there are significant issues with this PR in its current form.

api = ShoonyaApiPy()

#credentials
user = <uid>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this not merged yet?
the user variable is not used
when api.login is called, userid is assigned a value from uid which is not defined

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.

4 participants