Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-20 Thread Harsha Kumara
On Wed, Aug 21, 2019 at 7:17 AM Malintha Amarasinghe wrote: > > > On Tue, Aug 20, 2019 at 6:37 PM Kasun Thennakoon wrote: > >> Hi All, >> >> >> Regarding the @Vithursa Mahendrarajah 's encoding >> query params issue, >> >> What if we simply encode the path parameter using base64 ? >> >> for

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-20 Thread Malintha Amarasinghe
On Tue, Aug 20, 2019 at 6:37 PM Kasun Thennakoon wrote: > Hi All, > > > Regarding the @Vithursa Mahendrarajah 's encoding > query params issue, > > What if we simply encode the path parameter using base64 ? > > for example > > With URL encoding: >

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-20 Thread Kasun Thennakoon
Hi All, Regarding the @Vithursa Mahendrarajah 's encoding query params issue, What if we simply encode the path parameter using base64 ? for example With URL encoding: https://localhost:9443/api/am/publisher/v1.0/roles/Internal%2Fcreator

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-20 Thread Bhathiya Jayasekara
On Tue, Aug 20, 2019 at 4:38 PM Harsha Kumara wrote: > > This is a good finding. Given this issue, I don't think it is a good idea > to proceed with the encoded slash in the path. > >> >> Alternatively, we can pass user-store in following ways: >> >>1.

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-20 Thread Harsha Kumara
On Tue, Aug 20, 2019 at 4:35 PM Bhathiya Jayasekara wrote: > > > On Tue, Aug 20, 2019 at 4:27 PM Harsha Kumara wrote: > >> >> >> On Tue, Aug 20, 2019 at 3:35 PM Bhathiya Jayasekara >> wrote: >> >>> >>> >>> On Tue, Aug 20, 2019 at 3:27 PM Malintha Amarasinghe >>> wrote: >>> On

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-20 Thread Bhathiya Jayasekara
On Tue, Aug 20, 2019 at 4:27 PM Harsha Kumara wrote: > > > On Tue, Aug 20, 2019 at 3:35 PM Bhathiya Jayasekara > wrote: > >> >> >> On Tue, Aug 20, 2019 at 3:27 PM Malintha Amarasinghe >> wrote: >> >>> >>> >>> On Mon, 19 Aug 2019, 20:01 Vithursa Mahendrarajah, >>> wrote: >>> Hi all,

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-20 Thread Harsha Kumara
On Tue, Aug 20, 2019 at 3:35 PM Bhathiya Jayasekara wrote: > > > On Tue, Aug 20, 2019 at 3:27 PM Malintha Amarasinghe > wrote: > >> >> >> On Mon, 19 Aug 2019, 20:01 Vithursa Mahendrarajah, >> wrote: >> >>> Hi all, >>> >>> I have started the implementation. When giving roles with userstore >>>

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-20 Thread Bhathiya Jayasekara
On Tue, Aug 20, 2019 at 3:27 PM Malintha Amarasinghe wrote: > > > On Mon, 19 Aug 2019, 20:01 Vithursa Mahendrarajah, > wrote: > >> Hi all, >> >> I have started the implementation. When giving roles with userstore >> domain name separated with "/", *HTTP/1.1 400 Bad Request* error >> response is

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-20 Thread Malintha Amarasinghe
On Mon, 19 Aug 2019, 20:01 Vithursa Mahendrarajah, wrote: > Hi all, > > I have started the implementation. When giving roles with userstore domain > name separated with "/", *HTTP/1.1 400 Bad Request* error response is > returned, as encoded slashes is not allowed by default in tomcat. As >

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-19 Thread Vithursa Mahendrarajah
Hi all, I have started the implementation. When giving roles with userstore domain name separated with "/", *HTTP/1.1 400 Bad Request* error response is returned, as encoded slashes is not allowed by default in tomcat. As suggested in [1], when adding the system property

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-15 Thread Vithursa Mahendrarajah
Ack, will do that. On Fri, Aug 16, 2019 at 12:16 AM Harsha Kumara wrote: > @Vithursa Mahendrarajah Once you implement, let's add > several test cases with special characters, secondary user store roles and > etc. > > On Thu, Aug 15, 2019 at 4:16 PM Vithursa Mahendrarajah > wrote: > >> Hi all,

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-15 Thread Harsha Kumara
@Vithursa Mahendrarajah Once you implement, let's add several test cases with special characters, secondary user store roles and etc. On Thu, Aug 15, 2019 at 4:16 PM Vithursa Mahendrarajah wrote: > Hi all, > > Thanks for the suggestions. As per the suggestions, we have decided to go > with

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-15 Thread Vithursa Mahendrarajah
Hi all, Thanks for the suggestions. As per the suggestions, we have decided to go with HEAD request option. As mentioned earlier in this thread, following are the scenarios where role validation is required: 1. API Design phase - - Publisher access control - check whether the role exists

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-15 Thread Naduni Pamudika
+Vithursa Mahendrarajah On Mon, Aug 12, 2019 at 5:26 PM Sanjeewa Malalgoda wrote: > > > On Thu, Aug 8, 2019 at 9:08 PM Malintha Amarasinghe > wrote: > >> When we return a 404, it implies that the URL (or the resource) does not >> exist. Here the URL/resource is */validate-role *(a controller

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-12 Thread Sanjeewa Malalgoda
On Thu, Aug 8, 2019 at 9:08 PM Malintha Amarasinghe wrote: > When we return a 404, it implies that the URL (or the resource) does not > exist. Here the URL/resource is */validate-role *(a controller resource) > which always exists so it is wrong to return a 404 at any case. > Yes agree with this

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-08 Thread Nirmal Fernando
+1 for *HEAD /roles/{roleName} - *makes more sense and cleaner. If an user wants to pass the user store explicitly, shall we add a query param? *HEAD /roles/{roleName}?userstore=X * On Thu, Aug 8, 2019 at 11:38 AM Malintha Amarasinghe wrote: > When we return a 404, it implies that the URL (or

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-08 Thread Malintha Amarasinghe
When we return a 404, it implies that the URL (or the resource) does not exist. Here the URL/resource is */validate-role *(a controller resource) which always exists so it is wrong to return a 404 at any case. Thanks! On Thu, Aug 8, 2019 at 7:12 PM Menaka Jayawardena wrote: > Hi Naduni, > > Wh

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-08 Thread Menaka Jayawardena
Hi Naduni, Wh the GET request always returns 200? Can't we set the status code 404 if the role is not found? So we can check the response status from the UI. We do not want to read the body then. On Thu, Aug 8, 2019 at 6:05 PM Naduni Pamudika wrote: > Hi All, > > Thanks all for the

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-08 Thread Naduni Pamudika
Hi All, Thanks all for the suggestions. With the GET method @Bhathiya Jayasekara suggested, we have the following 2 options now. 1. *HEAD /roles/{roleName}* 2. *GET /validate-role?role=rolename* If we go with the option 1, it will simplify the work in the UI side while doing the role

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-07 Thread Bhathiya Jayasekara
On Wed, Aug 7, 2019 at 6:24 PM Malintha Amarasinghe wrote: > > > On Wed, Aug 7, 2019 at 3:39 PM Harsha Kumara wrote: > >> >> >> On Wed, Aug 7, 2019 at 3:37 PM Malintha Amarasinghe >> wrote: >> >>> >>> >>> On Wed, Aug 7, 2019 at 3:35 PM Harsha Kumara wrote: >>> Let's say if someone wants

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-07 Thread Malintha Amarasinghe
On Wed, Aug 7, 2019 at 6:31 PM Harsha Kumara wrote: > > > On Wed, Aug 7, 2019 at 6:24 PM Malintha Amarasinghe > wrote: > >> >> >> On Wed, Aug 7, 2019 at 3:39 PM Harsha Kumara wrote: >> >>> >>> >>> On Wed, Aug 7, 2019 at 3:37 PM Malintha Amarasinghe >>> wrote: >>> On Wed, Aug 7,

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-07 Thread Harsha Kumara
On Wed, Aug 7, 2019 at 6:24 PM Malintha Amarasinghe wrote: > > > On Wed, Aug 7, 2019 at 3:39 PM Harsha Kumara wrote: > >> >> >> On Wed, Aug 7, 2019 at 3:37 PM Malintha Amarasinghe >> wrote: >> >>> >>> >>> On Wed, Aug 7, 2019 at 3:35 PM Harsha Kumara wrote: >>> Let's say if someone wants

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-07 Thread Malintha Amarasinghe
On Wed, Aug 7, 2019 at 3:39 PM Harsha Kumara wrote: > > > On Wed, Aug 7, 2019 at 3:37 PM Malintha Amarasinghe > wrote: > >> >> >> On Wed, Aug 7, 2019 at 3:35 PM Harsha Kumara wrote: >> >>> Let's say if someone wants to check existence of role foo in user store >>> TEST. He will do a call

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-07 Thread Bhathiya Jayasekara
I prefer *GET /validate-role?role=rolename* over the HEAD request. WDYT? Thanks, Bhathiya On Wed, Aug 7, 2019 at 3:33 PM Mushthaq Rumy wrote: > Adding [Architecture] > > On Wed, Aug 7, 2019 at 3:30 PM Mushthaq Rumy wrote: > >> Since we will be UserStoreManager, this should cover the secondary

Re: [Architecture] [APIM-3.0] Publisher rest API to check a role name existence

2019-08-07 Thread Mushthaq Rumy
Adding [Architecture] On Wed, Aug 7, 2019 at 3:30 PM Mushthaq Rumy wrote: > Since we will be UserStoreManager, this should cover the secondary user > stores as well. > > Thanks & Regards, > Mushthaq > > On Wed, Aug 7, 2019 at 3:28 PM Harsha Kumara wrote: > >> What happen if the role is from