Bugzilla – Attachment 75060 Details for
Bug 20624
Disable the OAuth2 client credentials grant by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20624: Add RESTOAuth2ClientCredentials syspref
Bug-20624-Add-RESTOAuth2ClientCredentials-syspref.patch (text/plain), 3.45 KB, created by
Kyle M Hall (khall)
on 2018-05-04 10:58:22 UTC
(
hide
)
Description:
Bug 20624: Add RESTOAuth2ClientCredentials syspref
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-05-04 10:58:22 UTC
Size:
3.45 KB
patch
obsolete
>From 3a7306d5786a62979345b1aa7f82b65cf2e18b7a Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 2 May 2018 11:20:37 -0300 >Subject: [PATCH] Bug 20624: Add RESTOAuth2ClientCredentials syspref > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_20624_disable_oauth.perl | 12 ++++++++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/web_services.pref | 8 +++++++- > 3 files changed, 20 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_20624_disable_oauth.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_20624_disable_oauth.perl b/installer/data/mysql/atomicupdate/bug_20624_disable_oauth.perl >new file mode 100644 >index 0000000000..79bc904240 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_20624_disable_oauth.perl >@@ -0,0 +1,12 @@ >+$DBversion = "XXX"; >+if(CheckVersion($DBversion)) { >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) >+ VALUES >+ ('RESTOAuth2ClientCredentials','0',NULL,'If enabled, the OAuth2 client credentials flow is enabled for the REST API.','YesNo'); >+ }); >+ >+ print "Upgrade to $DBversion done (Bug 20624 - Disable OAuth2 client credentials grant by default)\n"; >+ SetVersion($DBversion); >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 4a594f0fbb..d12791b034 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -467,6 +467,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'), > ('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'), > ('RESTdefaultPageSize','20','','Default page size for endpoints listing objects','Integer'), >+('RESTOAuth2ClientCredentials','0',NULL,'If enabled, the OAuth2 client credentials flow is enabled for the REST API.','YesNo'), > ('RestrictedPageLocalIPs','',NULL,'Beginning of IP addresses considered as local (comma separated ex: "127.0.0,127.0.2")','Free'), > ('RestrictedPageContent','',NULL,'HTML content of the restricted page','TextArea'), > ('RestrictedPageTitle','',NULL,'Title of the restricted page (breadcrumb and header)','Free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref >index 82f7501e38..d9ad25fb52 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref >@@ -4,7 +4,13 @@ Web services: > - "Set the default number of results returned by the REST API endpoints to" > - pref: "RESTdefaultPageSize" > class: integer >- - "per page" >+ - "per page." >+ - >+ - pref: RESTOAuth2ClientCredentials >+ choices: >+ yes: Enable >+ no: "Disable" >+ - "the OAuth2 client credentials grant for the REST API." > OAI-PMH: > - > - pref: OAI-PMH >-- >2.15.1 (Apple Git-101)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20624
:
74986
|
74987
|
74988
|
74989
|
75020
|
75021
| 75060 |
75061
|
75062
|
75063
|
75064
|
75065
|
75132
|
75184
|
75206