Skip to content

sw1nn/bamboodle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bamboodle

implements a command that will retrieve authorisation cookies for a bamboo hr session. These cookies can then be used in subsequent scripting

Installation

You must install python-selenium and a suitable driver from AUR (chromedriver)

The command retrieves credentials from password store which should be installed and configured properly

General

  • Arrange for the dependencies in Pipfile to be installed.
$ cd ${REPO_HOME}
$ python3 setup.py install

Arch linux

in package/arch you will find a PKGBUILD file that will build a package suitable for installing with pacman (or more likely a wrapper around pacman, like Yay, that allows installation of AUR packages)

$ cd ${REPO_HOME}/package/arch

# Install AUR package requirements, which are not installed by makepkg -s
$ yay -S python-selenium chromedriver


# Will install dependencies that can be found via pacman
# This will pull the latest version of this repo and build a pacman package, 
# with version related to the git `SHA`
$ makepkg -s .

# Install the package you just built
$ yay -U bamboodle-git*.tar.zst

Usage

Common

Relevant however you invoke the tool.

# If you have a custom domain (can also use -d a-company.bamboohr.com command line option)
$ export BAMBOOHR_DOMAIN=a-company.bamboohr.com 

# Store your credentials in password-store
$ pass insert <username>/${BAMBOOHR_DOMAIN:-bamboohr.com}

Call python directly

$ python3 src/bambdoodle/cookie.py -v <username>
Hunting for cookies for <username>
Logging into https://a-company.bamboohr.com...
Entered username
Entered password
Clicked trust button
DONE
Cookie is:

trusted_browser=XXXXX;lluidt=XXXXX;lluidh=XXXXX;llfn=Bob;lluid=XXXXX;PHPSESSID=XXXXX

Arch linux

# The last line are the cookies you need for scripting.
$ bamboodle -v <username>
Hunting for cookies for <username>
Logging into https://a-company.bamboohr.com...
Entered username
Entered password
Clicked trust button
DONE
Cookie is:

trusted_browser=XXXXX;lluidt=XXXXX;lluidh=XXXXX;llfn=Bob;lluid=XXXXX;PHPSESSID=XXXXX

# default output is just the cookie, to be used for scripting.
$ COOKIE=$(bamboodle <username>)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published