Comments (9)
@connormanning mainly I am interested in how to configure the authentication server to make it work with greyhound. Thanks!
from greyhound.
Hello @connormanning, I have been trying to configure an authentication server, but I don't see where or how greyhound will check for the cookie for a specific user and not a general cookie. Could you please let me know? Thanks!
from greyhound.
See docs here. For authentication server functionality, your project needs to store a cookie that is identifiable to the current user, e.g. a login token. Then set that user-identifiable cookie name as your configuration value for auth.cookieName
to Greyhound. Then your authentication server will receive requests from Greyhound with the same cookie you're already using for auth to your application.
from greyhound.
@connormanning thank you. It just was not very clear to me the cookie workflow from the docs. Does Greyhound pick the login token cookie which name is specified in ("auth.cookieName") from the user and then validates it in the auth server t check for access to a resource? Thanks. I will give it a try.
from greyhound.
Greyhound will make requests to <your-auth-server>/<resource-requested>
, and will forward the cookie with the name auth.cookieName
in this request. The rest is up to your auth server - send a 200 or 4xx error with this information.
from greyhound.
Thank you @connormanning. I am still trying to solve it. It looks like it is always authenticating the user, even if it should not. Need to see why the authentication feature is not working. Thanks.
from greyhound.
I've verified against a sample auth server that just sends 200
if the resource is autzen
or 400
otherwise and it's working as intended:
var app = require('express')();
app.use('/:resource', function(req, res) {
res.status(req.params.resource == 'autzen' ? 200 : 400).send();
});
require('http').createServer(app).listen(8081);
...with Greyhound configuration:
{ "http": { "port": 8085 },
"auth": {
"path": "http://localhost:8081",
"cacheMinutes": { "good": 1, "bad": 1 }
}
}
I'd recommend building up from something trivial like this.
from greyhound.
thank you so much @connormanning . I am trying to run this example but I am always getting the following error from greyhound. What do you think it could be?
"""
LOG Auth proxy err: { [Error: connect ECONNREFUSED 127.0.0.1:8081]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 8081 }
03:21:18:69 LOG Error handling: { code: 500, message: 'Authentication error' }
"""
from greyhound.
@connormanning just so you know. The error was that I needed to map the network to the docker container too with ( sudo docker run --net="host") . So that my host and docker container 127.0.0.1:8081 were the same. Thanks for everything. I think I got it from here.
from greyhound.
Related Issues (20)
- Data staging
- Service info improvements
- Endianness of binary data count incorrect
- Read query returning zero results dependant on formatting of query data HOT 8
- HTTP error *** could not be created. HOT 1
- Greyhound stops responding HOT 6
- Filter argument sensative to quote type HOT 2
- Ram never released with docker HOT 4
- Greyhound not reading entwine data HOT 8
- Index not refreshed HOT 1
- Implement STAC catalog metadata
- Greyhound docker image not working as expected on Windows 10 HOT 1
- Greyhound server stops giving with error "Backtrace functionality was not linked" on AWS HOT 1
- I was set up test but I got the error HOT 1
- greyhound cmake build fails with latest entwine HOT 1
- Trying /opt/data: fail - Could not read file /opt/data/PointCloud/entwine HOT 3
- Release Dockerfile
- Explicitly add entwine as a dependency HOT 6
- Support for EPT format HOT 4
- Begining with greyhound HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from greyhound.