Authentication Guide - cloud-barista/cb-spider GitHub Wiki
This guide describes authentication methods for CB-Spider server configuration and authentication using spctl and curl.
Configure in the ./setup.env file:
export SPIDER_USERNAME=admin
export SPIDER_PASSWORD=your-passwordNote: Password must be changed to a different value
Server restart required after changes
| Method | Description | Usage Example |
|---|---|---|
| Environment Variables (Recommended) | Set environment variables for easy use |
export SPIDER_USERNAME=adminexport SPIDER_PASSWORD=your-password./spctl connection list
|
| Command Flags | Pass credentials directly in command | ./spctl -u admin -p your-password connection list |
- Command flags have higher priority than environment variables
| Method | Description | Usage Example |
|---|---|---|
-u Option |
Pass credentials directly | curl -u admin:your-password http://localhost:1024/spider/connectionconfig |
| Authorization Header | Pass Base64 encoded credentials in header | curl -H 'Authorization: Basic YWRtaW46c2FtcGxl' http://localhost:1024/spider/connectionconfig |
| Operation | Command | Example |
|---|---|---|
| Encoding | echo -n "username:password" | base64 |
admin:sample → YWRtaW46c2FtcGxl
|
| Decoding | echo "encoded-value" | base64 -d |
YWRtaW46c2FtcGxl → admin:sample
|
| Method | Usage Example |
|---|---|
| Web Browser Login | Access http://localhost:1024/spider/adminweb and login |
- Session Validity: 4 hours (Sliding Expiry)
- Logout: Immediate session deletion
- Server Restart: All sessions destroyed