Skip to content
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

Support for spontaneous scopes #839

Closed
nynymike opened this issue Jul 1, 2018 · 15 comments
Closed

Support for spontaneous scopes #839

nynymike opened this issue Jul 1, 2018 · 15 comments
Assignees
Labels
enhancement libs update, re-factroring, etc. high priority resolution must be prioritized
Projects
Milestone

Comments

@nynymike
Copy link
Contributor

nynymike commented Jul 1, 2018

There is a requirement for payments to send a transaction id as part of the scope. For example:
pis:4685456787 (where 4685456787 is the id of a certain resource)
or
sign:MmU5OTc1ODU0ODk3MmE4ZTg4MjJhZDQ3ZmExMDE3ZmY3MmYwNmYzZmY2YTAxNjg1MWY0NWMzOTg3MzJiYzUwYw==,RXhhbXBsZSBDb250cmFjdA==

Where the first parameter has a base64url encoded has value, second parameter after, is a label of the document to be signed.

The client should be configured to accept "spontaneous scopes"--as normally any non-registered scope should be rejected.

We also need to add a "spontaneous scope interception script", and map this script in the client configuration.

@nynymike nynymike added the enhancement libs update, re-factroring, etc. label Jul 1, 2018
@nynymike nynymike modified the milestones: 3.1.4, 4.0 Jul 1, 2018
@yuriyz
Copy link
Contributor

yuriyz commented Nov 19, 2018

It is good idea to design it while we are re-factoring scope handling within this ticket #756.

@qbert2k
Copy link
Contributor

qbert2k commented May 13, 2019

@yuriyz @nynymike
Please provide more details about the requirement.

@yuriyz
Copy link
Contributor

yuriyz commented May 14, 2019

I will take over this feature. Re-scheduling it on 4.1 since due date of 4.0 code freeze was yesterday.

@yuriyz yuriyz assigned yuriyz and unassigned qbert2k May 14, 2019
@yuriyz yuriyz modified the milestones: 4.0, 4.1 May 14, 2019
@altexy
Copy link

altexy commented Aug 15, 2019

@yuriyz @nynymike
Please provide more details about the requirement.

I agree that the requirements are not fully detailed.

One point:

As I understand from discussion here #1133 (comment)
we plan to persist spontaneous scopes.

If it used as transaction part in a real-life system the number of registered scoped would increase indefinitely, IMO it is unacceptable.
We should think about the TTL of spontaneous scopes.

@yuriyz
Copy link
Contributor

yuriyz commented Aug 15, 2019

Right, in client config we should give ability to specify lifetime of spontaneous scopes (if no lifetime specified then indefinite -> scope will not be cleaned up).

@altexy
Copy link

altexy commented Aug 16, 2019

Right, in client config we should give ability to specify lifetime of spontaneous scopes (if no lifetime specified then indefinite -> scope will not be cleaned up).

IMO we should have configurable default TTL instead of indefinite.

@yuriyz yuriyz added the high priority resolution must be prioritized label Sep 13, 2019
yuriyz pushed a commit to GluuFederation/community-edition-setup that referenced this issue Oct 25, 2019
yuriyz pushed a commit that referenced this issue Oct 28, 2019
…ty to enable/disable spontaneous scopes for given client.

#839
yuriyz pushed a commit to GluuFederation/community-edition-setup that referenced this issue Oct 31, 2019
yuriyz pushed a commit to GluuFederation/community-edition-setup that referenced this issue Oct 31, 2019
yuriyz pushed a commit that referenced this issue Oct 31, 2019
yuriyz pushed a commit to GluuFederation/community-edition-setup that referenced this issue Oct 31, 2019
@yuriyz
Copy link
Contributor

yuriyz commented Oct 31, 2019

Global oxauth configuration:

  • spontaneousScopeLifetime - spontaneous scope lifetime

Client :

  • allow_spontaneous_scopes - boolean, whether to allow spontaneous scopes for client
  • spontaneous_scopes - list of spontaneous scopes (regexp against which validation is performed)

New scope type : spontaneous.

yuriyz pushed a commit that referenced this issue Oct 31, 2019
…ope with specified lifetime. Added spontaneous scopes to cleaner timer.

#839
yuriyz pushed a commit to GluuFederation/oxCore that referenced this issue Nov 1, 2019
yuriyz pushed a commit to GluuFederation/oxCore that referenced this issue Nov 1, 2019
yuriyz pushed a commit that referenced this issue Nov 1, 2019
yuriyz pushed a commit that referenced this issue Nov 1, 2019
yuriyz pushed a commit that referenced this issue Nov 1, 2019
…stead of explicitly defining supported types) - in this way when new type is added we are good to go by default.

#839
@yuriyz
Copy link
Contributor

yuriyz commented Dec 23, 2019

Docs added GluuFederation/docs-ce-prod@45011ef

@yuriyz
Copy link
Contributor

yuriyz commented Dec 23, 2019

Implemented in master (4.2)

@yuriyz yuriyz closed this as completed Dec 23, 2019
yuriyz added a commit to GluuFederation/docs-ce-prod that referenced this issue Dec 23, 2019
yuriyz added a commit to GluuFederation/community-edition-setup that referenced this issue Dec 23, 2019
@yurem yurem added this to Done in CE 4.2.0 Jan 3, 2020
yuriyz added a commit that referenced this issue Jan 20, 2020
@altexy
Copy link

altexy commented Jan 22, 2020

@yuriyz at which time the "spontaneous scope interception script" is invoked?

  • when token with spontaneous scope is requested from GS?
  • or when access token is introspected?

@yuriyz
Copy link
Contributor

yuriyz commented Jan 22, 2020

It is invoked during token request.

@altexy
Copy link

altexy commented Jan 22, 2020

thanks

@sahilIT2020
Copy link
Contributor

allowSpontaneousScopes and spontaneousScopes are not saved in client settings and reverted to default/blank after hitting save.

image

@sahilIT2020 sahilIT2020 reopened this Jun 10, 2020
CE 4.2.0 automation moved this from Done to In progress Jun 10, 2020
@yuriyz yuriyz closed this as completed Jun 10, 2020
CE 4.2.0 automation moved this from In progress to Done Jun 10, 2020
@yuriyz yuriyz reopened this Jun 10, 2020
CE 4.2.0 automation moved this from Done to In progress Jun 10, 2020
@yuriyz yuriyz assigned syntrydy and unassigned yuriyz Jun 10, 2020
@yuriyz
Copy link
Contributor

yuriyz commented Jun 30, 2020

I will take over

@yuriyz yuriyz assigned yuriyz and unassigned syntrydy Jun 30, 2020
@yuriyz
Copy link
Contributor

yuriyz commented Jul 14, 2020

I've checked it on latest 4.2. It perfectly works. Changes are saved (LDAP reflects changes as well as UI).

@yuriyz yuriyz closed this as completed Jul 14, 2020
CE 4.2.0 automation moved this from In progress to Done Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement libs update, re-factroring, etc. high priority resolution must be prioritized
Projects
No open projects
CE 4.2.0
  
Done
Development

No branches or pull requests

6 participants