Comments (12)
I am having this same problem presumably with Slack Connector, anybody have any tips on how to get this to function correctly?
from hubot-auth.
+1
Looks deliberate.
from hubot-auth.
If I remeber correctly, it's storing in brain, but the way we're using hubot storage makes it unclear from the code -- specifically, we're not using set
/get
. This was just how it was originally written before me, and I haven't changed it.
Specifically, we have a user
object from the brain here:
https://github.com/hubot-scripts/hubot-auth/blob/master/src/auth.coffee#L75
And we push another user in here, which if I remember correctly, still stores it in the brain:
https://github.com/hubot-scripts/hubot-auth/blob/master/src/auth.coffee#L86
If this isn't happening, then it's sheer idiocy on someone's part -- hopefully not mine, but possibly :/
The tests say it's working, fwiw (highlighted one adds "demo" role and then checks for it):
https://travis-ci.org/hubot-scripts/hubot-auth/jobs/34150231
https://github.com/hubot-scripts/hubot-auth/blob/master/test/auth-test.coffee#L85-L93
Anyhow, definitely willing to accept pull requests, hopefully with better tests if it was broken :)
from hubot-auth.
My test of "add a role, reboot hubot" definitely fails manually.
As far as I can tell, from the brain code only get/set are saved, as this
the private data is stored as a dictionary.
I'll see if I can whip up a PR with some tests tomorrow. I only didnt do
this already because I thought it was some intentional security thing.
On Monday, January 26, 2015, Patrick Connolly [email protected]
wrote:
If I remeber correctly, it's storing in brain, but the way we're using
hubot storage makes it unclear from the code -- specifically, we're not
using set/get. This was just how it was originally written before me, and
I haven't changed it.Specifically, we have a user object from the brain here:
https://github.com/hubot-scripts/hubot-auth/blob/master/src/auth.coffee#L75And we push another user in here, which if I remember correctly, still
stores it in the brain:
https://github.com/hubot-scripts/hubot-auth/blob/master/src/auth.coffee#L86If this isn't happening, then it's sheer idiocy on someone's part --
hopefully not mine, but possibly :/The tests say it's working, fwiw (highlighted one adds "demo" role and
then checks for it):
https://travis-ci.org/hubot-scripts/hubot-auth/jobs/34150231https://github.com/hubot-scripts/hubot-auth/blob/master/test/auth-test.coffee#L85-L93
Anyhow, definitely willing to accept pull requests, hopefully with better
tests if it was broken :)—
Reply to this email directly or view it on GitHub
#14 (comment)
.
from hubot-auth.
I think that this has to do with implementation details. I just tried a local test with redis brain, no adapter, and it does store the role.
When i test with the slack adapter and s3-brain though, it doesn't work. This either has to do with the adapters representation of a user, or the brain's serialization method.
I'd suggest that the behavior should still be patched, but that would probably break compatibility where it is currently stored on the user object instead of in _private.
Maybe the way forward is we add an auth dictionary to _private, and detected the presence of roles in user objects for compatibility?
from hubot-auth.
I see the same issue. I am using redis-brain for hubot storing to Redis, but it only stores the user and not the groups.
Is there a workaround for this?
from hubot-auth.
Hi! Interestingly, I see hubot storing the groups, but actually actively deleting the groups after a restart...
Alright, after some investigation, I'm thinking the error might not be in hubot auth, considering auth stores the role properly, and the role gets removed after a restart - and I cant find anything that would do this in the module.
However I am looking into the hipchat adapter and think the issue might be in this direction:
https://github.com/hipchat/hubot-hipchat/blob/master/src/hipchat.coffee#L150
Do you all use the hipchat adapter?
Note: hipchat/hubot-hipchat#213
Came across this: hipchat/hubot-hipchat@598bace but it is older...
Ok it looks like the patch has been merged, but this hasn't been published to node repository, when asking for the latest hubot-hipchat I dont get the version with his patch
from hubot-auth.
Ok my conclusion: the bug is in the hipchat adapter, and was fixed by the PR #215 hipchat/hubot-hipchat#215 - however from what I can see the change hasn't been pushed to npmjs repository. I changed my package.json to download from git instead of from npmjs:
"hubot-hipchat": "hipchat/hubot-hipchat",
And now it works! Hope this is helpful.
from hubot-auth.
Hooray! Good sleuthing @yannh! I wasn't seeing that behaviour, but was nonetheless feeling guilty about not putting enough time in to solve this, so I appreciate it.
I'm going to close this out for now,
from hubot-auth.
I think auth might be in hubot core now, fyi -- been awhile since i used this, so it might be obsolete. Maybe search the core issue queue?
from hubot-auth.
I have the same Problem with mattermost adapter and mysql brain. It seems to save the roles to the brain but after restart everything is resetted. Do You have any hint how you fixed it?
from hubot-auth.
My biggest guess is that your REDIS config is incorrect. It could be either you didn't have Redis installed or you may have misconfigured. You could check your redis and make sure your Hubot configuration points to the correct Redis location.
from hubot-auth.
Related Issues (20)
- Command to list custom roles? HOT 6
- As an Ops, I want to be able to configure hubot-auth roles in order to be idempotent HOT 3
- Unable to unassign role once assigned HOT 3
- List Assigned Roles gets no response (Latest code not downloading/installing through NPM) HOT 5
- hubot-auth just won't work for me HOT 11
- admin role did not assigned correctly on 1.3.0 HOT 12
- > hubot what roles do I have? > @user2: user2 does not exist
- hubot auth no longer works after upgrading "hubot-slack": "^4.0.0", HOT 9
- implement as middleware to dynamically deny all besides self and whitelist users for a listener id HOT 1
- 2.0.0 (and 1.3.0) no longer support usernames with spaces HOT 1
- unit tests for scripts calling Auth? HOT 2
- Add feature to support id and name in HUBOT_AUTH_ADMIN HOT 2
- User does not exist HOT 10
- Persist user roles in redis.brain HOT 1
- Error when setting HUBOT_AUTH_ROLES HOT 2
- Does this work with hipchat? HOT 1
- There is no way to pre-load user/role list other than admin HOT 7
- Unable to set admin env variable for Hangups adapter
- looking for a project to address duo push of .coffee
- HUBOT_AUTH_ADMIN with XMPP jid
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 hubot-auth.