Skip to content

Fix command line search#28

Open
mattias-lidman wants to merge 1 commit intomainfrom
fix_btgrep
Open

Fix command line search#28
mattias-lidman wants to merge 1 commit intomainfrom
fix_btgrep

Conversation

@mattias-lidman
Copy link
Copy Markdown

Some breadcrumbs if/when we want to pick this up...

The changes below makes it so btgrep.py can make authenticated calls to our prod codesearcher domain.
The resulting request looks like e.g. https://codesearcher.int.sproutsocial.com/search/results.json?q=foobar&case=sensitive, and is a 500. It looks easy enough to fix (just follow link for stack trace). But I ran into problems running the app locally, either using Docker or running Django directly (with a 2.7 virtualenv...).

Copy link
Copy Markdown

@chrishalbert chrishalbert left a comment

Choose a reason for hiding this comment

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

I know its just a work in progress, but figured I'd add a few notes.

Comment thread scripts/btgrep.py
# You need to fill in the domain of where you install
# Botanist for this to work, obviously :)
BOTANIST_DOMAIN = 'http://example.com'
BOTANIST_DOMAIN = 'https://codesearcher.int.sproutsocial.com/'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It may be worth force pushing to remove that internal domain from this public pull request - not that it's accessible outside your network, but if someone gets on the network, they'd know where to go

Comment thread scripts/btgrep.py
BOTANIST_DOMAIN = 'https://codesearcher.int.sproutsocial.com/'
# NOTE: Fill out with real username/password to test.
# (Or come up with a real solution like sticking an auth-less version behind SDM)
LDAP_USERNAME = ''
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe put these variables in the .env.template and that way you can save your LDAP_USERNAME and LDAP_PASSWORD to the .env.local so that there's no chance of an accidental commit...but what could be really fun is integrating it with your SSO provider 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants