-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use GraphAPI for creating/deleting users and groups in acceptance test #3167
Comments
@ScharfViktor @phil-davis I am not entirely sure about who wants to work on this. But the above issue should give enough information on how to get started with it. (For curl based examples on how to use the endpoints see: #3149 If you have any questions or need help otherwise, just ping me! |
Notes: For example:
https://drone.owncloud.com/owncloud/ocis/9382/24/6
Those test suites explicitly test the provisioning API. So we probably want to leave those running their But we can adjust We can add some "local" API tests here in the oCIS repo to explicitly test the Graph API user/group endpoints for scenarios that would not be in "regular scenario setup". For example, change user attributes after user creation, adding/removing group membership after initial creation of users/groups, trying to do "naughty" things (invalid user/group names, trying to do actions without proper authentication credentials...) |
@rhafer are these endpoints available in |
I added this issue to the QA test automation backlog project. Unless there is urgency, we can put it in the next QA test automation sprint starting next Monday. That will be to do the core API test changes. @ScharfViktor I suggest that we create a separate issue for making local API tests that will exercise the whole graph API provisioning endpoints. Then that can be done as an independent task by someone. |
As all the |
Looking at the outstanding work, the part of this for core might need to wait another 2 weeks. Let's see what the current QA sprint looks like that is in planning today. |
@phil-davis I raised this to P2. Is that doable for your team? |
Request |
yes, no problem. I will talk with the guys in our local standup tomorrow morning and see if anyone can start on it. |
@ScharfViktor I've seen this on your machine, but I am not able to reproduce it. If this is still happening of you, could you please open a new issue, with details how you run ocis and a full debug log? (It might be unrelated to idm) |
I created a new issue in which I describe what I found #3247 |
That problem went away when I added nats to OCIS_RUN_EXTENSIONS |
@phil-davis Do you know if anybody already started to work on this? |
I am looking at it. I had a talk with Artur just now. I will make some architecture investigations to see how we can set it up a bit "nicely", and make a proof-of-concept... |
I've made a test setup following the instructions from the issue description. One thing I bumped into:
Setup
FindingsUsers
Groups
|
Ok. Cool. Meanwhile the code as evolved a bit and it should be somewhat simpler to start oCIS with a libregraph/idm (e.g. you don't need to manually build libregraph/idm anymore). I just opened #3372 to have a central place of instruction for the current state of affairs. It should end up on https://owncloud.dev/extensions/idm/ after merging and I'll try to keep it updated as the code evolves.
This is caused by #3343 and should be fixed with: #3371
That should also caused be fixed by the above PR I think.
Hm, I guess that is something I introduced recently. Will provide a fix asap.
Yeah that's the expected behaviour.
|
some points to mention:
|
Hm, I'll take a look at that.
I think that is the desired behaviour. At least unless the user is able to login. |
Without a profile password, login should be impossible ;) |
Bug or feature?
|
OCS provisioning API has an endpoint to list all groups assigned to a user.
for the Graph API we have an endpoint to list members of a group, but not one to list groups a member is assigned to. |
See above.
Hm, ok that's wrong. As least if looking at the MS docs. Groups should only be accessible by ID. Which admittely is somewhat inconsistent to Users.
Yes. That is a current limitation. We might address this in the future |
This is going to be address as part of: #3363 |
IMO, this feature is nice and also matches with OCS API |
For user-created using the GraphAPI, if we try to edit it using the OCS API,
and the server crashes with
|
@kiranparajuli589 Please create a separate issue for this. (Note: editiing users via OCS should return an error, but obviously not crash the service)
|
reported at #3483 |
The implementation could do more/better than just the MS Graph API defined endpoints/behavior. That will be a design decision for "somebody", and will need to be in documentation "somewhere". Whatever is implemented needs to also be documented, and we need to test the behavior so that those "extra" things don't get forgotten in future and accidentally regress. |
Update about tests: for acceptance tests, Now, I'm trying to run core API acceptance tests using Graph API with those refactored Given and Then steps in #3404 with owncloud/core#39927. |
#3507 was merged |
the ci is still failing with 401 unauthorized while creating users with admin user. |
with #3404, now we run acceptance tests using the GraphAPI for user/group provisioning. |
Signed-off-by: Kiran Parajuli <[email protected]>
…expected-failures-list [tests-only] remove closed issue #3167 from the list of expected failures
Summary
With the GraphAPI allowing to manage user and groups now we should adapt our test-suite to use these endpoints for creating user and groups when running the acceptance test. That means basically adapting
https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/Provisioning.php
to allow User Management via GraphAPI as another option.Reasoning
Howto setup a test env
#3149 gives an overview about how to use the GraphAPI for users and groups
As libregraph/idm is not yet integrated into the single binary ocis build there is a couple of manual step still required to get a test system up for development:
Get and build libregraph/idm
Initialize database an start the libregraph/idm service
Create a file
base.ldif
with this contents:Initialize the database:
Generate a self-signed cert (for testing only)
Start the service:
Start oCIS
The list for required settings it going to get smaller once we intefgrated all the pieces, but for now you'd need to start ocis with the following it environement variables set:
The text was updated successfully, but these errors were encountered: