Set Elements Visibility as Friend/Protected
2944
Views
53
Comments
On our RadarOn our Radar
Backend

Allow 3rd option on Entities, Actions as "Friend" which will make entities and actions visible to all modules within the Espaces Application, but not to other applications.  This will simplify having to keep entities as read-only and then creating actions to do the CRUD operations of the entity.  It will also improve security so that espaces that shouldn't be using these entities won't have visibility of them.

Should be merged with: https://www.outsystems.com/ideas/1333/more-granularity-of-public-exposure-of-elements/

J.Ja
2016-04-21 20-09-55
J.
 
MVP
The fact that entities expodes via a xif are public to everyone.. *shivers*

Voting for this. This would be very good for unit testing - so you can make actions/entities available in the eSpace of tests, but not to other applications.
2014-02-07 17-02-43
Vasco Pessanha
Merged this idea with 'Inheritance improvement (Protected)' (created on 2018-04-03 13:05:13 by Patrick Baanvinger)

When we create applications and modules, we can set if certain items are public of private. The problem is we have no in between.

  • When I make a function public, every espace can use the functionality
  • When I make a function private, no espace can use the functionality

What I would like is a setting where I can reuse functionality within the application, but not by eSpaces outside of the application boundary. 

Why?

By using a protected inheritance, I can use a seperate business logic layer and reuse the functionality within my application. But from outside of the application, this part is not a shared resource.




Merged from 'Inheritance improvement (Protected)' (idea created on 2018-04-03 13:05:13 by Patrick Baanvinger), on 2018-04-05 08:45:35 by Vasco Pessanha

Simliar to
https://www.outsystems.com/ideas/1695/Entity%2fAction+Visibility+as+Friend



Merged from 'Inheritance improvement (Protected)' (idea created on 2018-04-03 13:05:13 by Patrick Baanvinger), on 2018-04-05 08:45:35 by Vasco Pessanha
2014-02-07 17-02-43
Vasco Pessanha
Merged this idea with 'Add protected access state to actions/entities/etc' (created on 2016-02-25 08:37:24 by Hans Bruins)
Hi,

If you follow the 4 layer architecture (or another approach) then you will have several espaces/modules in 1 application. 
The communication between the layers is done via Public actions/entities.

But everything public is also available outside your application. Sometimes you want this but most of the time not. There are ways to prevent this but they are not 'clean' solutions.

So I propose: a new access state called 'Protected' which means that the action/entity/etc is only vissible in your Application.
After this you will have the states private, public (currently used) and protected (newly added). This will give you more control and now you can build your security critical application in the 4 layer architecture without worrying about 'unwanted reuse' :)

Regards,
Hans



Merged from 'Add protected access state to actions/entities/etc' (idea created on 2016-02-25 08:37:24 by Hans Bruins), on 2018-04-05 08:46:09 by Vasco Pessanha

Totally agree on this.

In most cases, you don't want other developers/applications to be able to call your code or use your entities.



Merged from 'Add protected access state to actions/entities/etc' (idea created on 2016-02-25 08:37:24 by Hans Bruins), on 2018-04-05 08:46:09 by Vasco Pessanha

Action exposition should not be binary (Exposed/Not Exposed).
This suggestion is for a concept similar to private, protected and public.

The aim would be to define actions that can only be consumed by a specific (group of) eSpace(s).

An example would be crud actions, to isolate this and ensure the whole application uses the same entry point to a crud.



Merged from 'Restricted exposition actions.' (idea created on 2017-11-10 13:54:06 by João Oliveira), on 2018-02-26 12:22:12 by Vasco Pessanha

Merged from 'Add protected access state to actions/entities/etc' (idea created on 2016-02-25 08:37:24 by Hans Bruins), on 2018-04-05 08:46:09 by Vasco Pessanha
2016-04-21 20-09-55
J.
 
MVP
Hi,

Complex environments have lots of espaces, extensions. Some extensions are used exclusively by a certain part of the applications. some extension.espaces like richwidgets are used *everywhere*.
Especially with the proposed 4-layer architecture. There is a lot of manual maintenane and checking how espaces and extensions are referred to each other.

The public/private is not really up to par with such environments.

I like to see much improvement in that department.

"Protected" state
==============
Element in protected state is only available to refer in the package/espace it belongs to.
This would benefit extensions you need to have, but only accessable via the espace-wrapper.
other applications need to use the wrapper instead of accessing the extension by themself.
this is per element.

more fine-grained would be
"Selected" state
============
You can choose which espaces are allowed to refer your selected-state elements.
Not sure if this set espace-wide or per element.
per element is really heavy on the outsystems-housekeeping


Merged from 'more granularity of public exposure of elements' (idea created on 2013-03-13 13:04:28 by J.), on 2017-11-10 14:00:20 by Daniel Martins

Merged from 'Restricted exposition actions.' (idea created on 2017-11-10 13:54:06 by João Oliveira), on 2018-02-26 12:22:12 by Vasco Pessanha

Merged from 'Add protected access state to actions/entities/etc' (idea created on 2016-02-25 08:37:24 by Hans Bruins), on 2018-04-05 08:46:09 by Vasco Pessanha
One of our biggest challenges is that our business objects layer has gotten absolutely massive. We would love to split this into multiple eSpaces so that two developers can work on it at the same time without merging so often or requiring many republishes of consumers. However, to do so would require us to make every entity public + not read only, so that the different eSpaces can all work together. We really need a way to make an entity public + not read only, but only for certain eSpaces, and make it public + read only for the rest.

Basically, I need an equivalent of "protected" or "friends".

J.Ja


Merged from 'Entities - Need protection between "Public" and "Private"' (idea created on 2013-08-18 16:57:02 by Justin James), on 2014-01-24 11:40:04 by Gonçalo Borrêga

Merged from 'more granularity of public exposure of elements' (idea created on 2013-03-13 13:04:28 by J.), on 2017-11-10 14:00:20 by Daniel Martins

Merged from 'Restricted exposition actions.' (idea created on 2017-11-10 13:54:06 by João Oliveira), on 2018-02-26 12:22:12 by Vasco Pessanha

Merged from 'Add protected access state to actions/entities/etc' (idea created on 2016-02-25 08:37:24 by Hans Bruins), on 2018-04-05 08:46:09 by Vasco Pessanha
2016-04-21 20-09-55
J.
 
MVP
100% agreed.




Merged from 'Entities - Need protection between "Public" and "Private"' (idea created on 2013-08-18 16:57:02 by Justin James), on 2014-01-24 11:40:04 by Gonçalo Borrêga

Merged from 'more granularity of public exposure of elements' (idea created on 2013-03-13 13:04:28 by J.), on 2017-11-10 14:00:20 by Daniel Martins

Merged from 'Restricted exposition actions.' (idea created on 2017-11-10 13:54:06 by João Oliveira), on 2018-02-26 12:22:12 by Vasco Pessanha

Merged from 'Add protected access state to actions/entities/etc' (idea created on 2016-02-25 08:37:24 by Hans Bruins), on 2018-04-05 08:46:09 by Vasco Pessanha
2016-04-21 20-09-55
J.
 
MVP
Bump, I need this still :)


Merged from 'more granularity of public exposure of elements' (idea created on 2013-03-13 13:04:28 by J.), on 2017-11-10 14:00:20 by Daniel Martins

Merged from 'Restricted exposition actions.' (idea created on 2017-11-10 13:54:06 by João Oliveira), on 2018-02-26 12:22:12 by Vasco Pessanha

Merged from 'Add protected access state to actions/entities/etc' (idea created on 2016-02-25 08:37:24 by Hans Bruins), on 2018-04-05 08:46:09 by Vasco Pessanha
I too would love to see this feature.  It is important that Outsystems talk to a number of large customers who have run into this is and gather their input before designing this change.  I would hate to see one or two 'flavors' added (public, private, friends, etc.) without trying to design and implement the best solution for everyone.

Merged from 'more granularity of public exposure of elements' (idea created on 2013-03-13 13:04:28 by J.), on 2017-11-10 14:00:20 by Daniel Martins

Merged from 'Restricted exposition actions.' (idea created on 2017-11-10 13:54:06 by João Oliveira), on 2018-02-26 12:22:12 by Vasco Pessanha

Merged from 'Add protected access state to actions/entities/etc' (idea created on 2016-02-25 08:37:24 by Hans Bruins), on 2018-04-05 08:46:09 by Vasco Pessanha
2014-02-07 17-02-43
Vasco Pessanha
Merged this idea with 'Restricted exposition actions.' (created on 2017-11-10 13:54:06 by João Oliveira)

Merged from 'Add protected access state to actions/entities/etc' (idea created on 2016-02-25 08:37:24 by Hans Bruins), on 2018-04-05 08:46:09 by Vasco Pessanha
Merged this idea with 'Restricted Public access entities/functions' (created on 28 May 2018 15:28:18 by Frank Grooten)

Currently an entity can be either non accessible or accessible for all modules and the CRUD rights need to be carefully configured in the model. 

For multiple technical reasons I get that; though this puts a lot of pressure on the developers/testers to ensure no data is exposed to wrong roles (anyone can make a full data retrieve of a public entity in any module; intended or unintented).

That's why I suggest to add anoption to restrict the entity access via service studio for a pre-defined set of modules. Off course you can hack this as a developer; but at least you can prevent unintended mistakes. 



Merged from 'Restricted Public access entities/functions' (idea created on 28 May 2018 15:28:18 by Frank Grooten), on 21 Jun 2018 19:40:53 by Justin James
Changed the category to
References
Merged this idea with 'finegrain "expose as readonly " for the consumers' (created on 17 Jan 2012 10:08:52 by J.)
2016-04-21 20-09-55
J.
 
MVP
When setting an entity to public you can only set "expose as readonly" to yes or no.

What I like to see is to be able to grant specifically to espaces wether they can access them as readonly or write also.

for example, you have your datamodel in 1 espace.
the BO-espace is allowed to crud the entity
the FO-moduleX is only allowed to read them
the FO-moduleY is also allowed to crud them



Merged from 'finegrain "expose as readonly " for the consumers' (idea created on 17 Jan 2012 10:08:52 by J.), on 21 Jun 2018 19:42:35 by Justin James
2014-02-07 17-02-43
Vasco Pessanha
Merged this idea with 'Internal visibility option' (created on 04 Jul 2018 10:33:58 by João Almeida)

This one I stole from .Net: things in OutSystems either are private/readonly or public, but in .Net you something in between called internal, where a module can give some other modules more visibility to some elements by using the internal keyword and the InternalsVisibleTo attribute.




This comment was:
- originally posted on idea 'Internal visibility option' (idea created on 04 Jul 2018 10:33:58 by João Almeida)
- merged to idea Entity/Action Visibility as Friend on 02 Aug 2018 10:52:34 by Vasco Pessanha
2016-04-21 20-09-55
J.
 
MVP

There is a similar idea floating about for months..




This comment was:
- originally posted on idea 'Internal visibility option' (idea created on 04 Jul 2018 10:33:58 by João Almeida)
- merged to idea Entity/Action Visibility as Friend on 02 Aug 2018 10:52:34 by Vasco Pessanha

* YEARS

J.Ja



This comment was:
- originally posted on idea 'Internal visibility option' (idea created on 04 Jul 2018 10:33:58 by João Almeida)
- merged to idea Entity/Action Visibility as Friend on 02 Aug 2018 10:52:34 by Vasco Pessanha
Changed the category to
References


This comment was:
- originally posted on idea 'Internal visibility option' (idea created on 04 Jul 2018 10:33:58 by João Almeida)
- merged to idea Entity/Action Visibility as Friend on 02 Aug 2018 10:52:34 by Vasco Pessanha
2025-02-22 18-27-01
Alfaro
 
MVP
Merged this idea with 'Enable private action visibility for named espaces' (created on 19 Nov 2018 07:02:13 by Mikko Nieminen)

It would be really great if espaces could have companion / friend / partial espaces, from where private actions could be referenced.

Example: 

  1. Espace A has a property where espace B is set as friend espace
  2. After publishing espace A, private actions/entities/structures from espace A can be referenced through espace B "Add references" dialog
  3. Espace B private actions cannot be referenced from espace A
  4. Espace C sees only public actions/entities/structures from espace A

There could be one or many friend espaces, but the main idea is to enable unit testing without resorting to web services and/or test related code ending up to production.



This comment was:
- originally posted on idea 'Enable private action visibility for named espaces' (created on 19 Nov 2018 by Mikko Nieminen)
- merged to idea 'Entity/Action Visibility as Friend' on 19 Nov 2018 09:04:26 by Carlos Alfaro

To my mind would be enough to have "friend" option for espaces inside same app. Then [Unit]tests may have access being located in same app and components will still don't care about possible consumers.



This comment was:
- originally posted on idea 'Enable private action visibility for named espaces' (created on 19 Nov 2018 by Mikko Nieminen)
- merged to idea 'Entity/Action Visibility as Friend' on 19 Nov 2018 09:04:26 by Carlos Alfaro
2014-02-07 17-02-43
Vasco Pessanha
Merged this idea with 'Objects Public Only Inside Application' (created on 28 Nov 2018 14:38:55 by Reinaldo André Muralha)

It should be able to expose the actions, tables, roles, etc. only inside the application (modules inside the application) or even be able to create a group of modules that belong to the same "project" and give specific security rules inside the "project".



This comment was:
- originally posted on idea 'Objects Public Only Inside Application' (created on 28 Nov 2018 by Reinaldo André Muralha)
- merged to idea 'Entity/Action Visibility as Friend' on 28 Nov 2018 16:15:31 by Vasco Pessanha
2016-04-21 20-09-55
J.
 
MVP
Merged this idea with 'More granular Public options' (created on 14 Jan 2019 08:59:48 by Vincent Koning)

Currently you can set your actions and entities to public and this makes them accessible in other components (both modules inside the current application and outside to other applications). I have several actions and entities that I want to expose between components inside the same application but not expose to other applications. This due to security, maintenance, workflow or other reasons. 

A more granular option set would be really helpful.



This comment was:
- originally posted on idea 'More granular Public options' (created on 14 Jan 2019 by Vincent Koning)
- merged to idea 'Set Elements Visibility as Friend/Protected' on 14 Jan 2019 09:18:34 by J.

Bump, we still need this. 

It's been over 5 years since this idea was posted. In large customers with independent teams, this is a must have. Please make this happen.

Yes. Please make this happen.

One more vote for this idea. Is large customers the number of public server actions is just massive and , in fact,  the majority of the server actions are not supposed to be "factory wide public". This raises concerns regarding applications that consume public server actions creating unwanted dependencies. Of course there is the need for "factory wide public" server actions, but most of them are "protected" (meaning: visible to all modules of the application were they belong).  When providing a "factory wide public" server action we should consider providing that logic in a decoupled fashion (rest api, service action) and "hide" the server action itself (because references to server actions are tightly coupled increasing the dependency management)

Merged this idea with 'Public Property for specifics modules' (created on 25 May 2020 15:02:22 by Tiago Bojikian Costa Vital)

Change the drop-down to the options (Yes - Every eSpace / Yes - Specific eSpaces / No) where the option  "Yes - Specific eSpaces" enables a plus icon below where you can select one or more Space that can access this public resource.

The reason is to force some architecture definition and ensure the best practices.



This comment was:
- originally posted on idea 'Public Property for specifics modules' (created on 25 May 2020 by Tiago Bojikian Costa Vital)
- merged to idea 'Set Elements Visibility as Friend/Protected' on 03 Jun 2020 01:53:12 by Justin James
Merged this idea with 'Define public property for specific modules or applications' (created on 24 Jun 2020 10:14:34 by Tiago Bojikian Costa Vital)

The suggestion is to allow we define the actions / entities / structures as public for all (like we have now) or for some specifics modules or applications.

So, maybe we can have like a plus icon if the public property is checked where by default the "All" is checked or you can find the modules that will be able to refer to these public elements.

Useful to ensure some architecture definitions.



This comment was:
- originally posted on idea 'Define public property for specific modules or applications' (created on 24 Jun 2020 by Tiago Bojikian Costa Vital)
- merged to idea 'Set Elements Visibility as Friend/Protected' on 27 Jun 2020 02:09:32 by Justin James
Merged this idea with 'Making items Public' (created on 24 Sep 2020 13:01:17 by Darren Meldrum)

I find the ability to make items Public (Screens/Blocks/Server Actions / Client Actions / Entities) to not have enough granularity.

In a properly architected application, I will have multiple modules. I want to be able to make entities public, but only to be consumed by certain other modules, typically those within the same application, or suite of applications.

In an ideal world, I'd also like to expose only certain attributes of an entity to be public, so I can retain certain attributes to be private to the module they are contained in. At the moment this can only be achieved by splitting the entity and having a 1-1 relationship between a public and private entity.

A step in the right direction would be having a 3-way status of "Private to Module", "Private to Application" and "Public to all modules" against all items and attributes.



This comment was:
- originally posted on idea 'Making items Public' (created on 24 Sep 2020 by Darren Meldrum)
- merged to idea 'Set Elements Visibility as Friend/Protected' on 27 Sep 2020 18:21:05 by Justin James
Merged this idea with 'Protected keyword for Actions, Entities, Structures' (created on 13 Jan 2021 16:58:42 by David Miller)

Idea summary:

In addition to Public, Public Readonly [Entities only] and Private states possible for Actions, Entities and Structures, additionally include Protected and Protected Readonly [Entities only] as possible states. 

Protected would ensure that the member is able to be referenced only by other modules within the same Application that the member's owning Module is part of. (Equivalent to being Public to same-application Modules, and Private to those outside of that scope).

Basis:

  1. Good architectural design will often lead to the identification of members that have no relevance or use outside of the wider application, but yet must still be referenced by other modules within the application to enable encapsulation.
  2. As a result of 1, data integrity can be more greatly assured by limiting the public scope to its intended audience.
  3. While there may be fixes that lend themselves towards this end (e.g. assessing the GetEntryEspaceId(), using an APIKey or other key/password method for identifying a query source) they do not seem natural, do not entirely resolve the issue and from the developer context are entirely insecure.

I completely concede that if a rogue application did enter an environment, and start abusing the publically available Actions to start inserting objects left-right and centre, it's a simple matter to find the culprit and disable it. Likewise release management should be assessing these risks before it is pushed into a live stage of the environment lifecycle. However, wouldn't this be a great proactive way to systematically drive this proactively and remove a level of risk?



This comment was:
- originally posted on idea 'Protected keyword for Actions, Entities, Structures' (created on 13 Jan 2021 by David Miller)
- merged to idea 'Set Elements Visibility as Friend/Protected' on 14 Jan 2021 15:17:37 by Daniël Kuhlmann

Hi David,

Very good idea, already created multiple times, I merge it like the previous times into the original idea.

Regards,

Daniel



This comment was:
- originally posted on idea 'Protected keyword for Actions, Entities, Structures' (created on 13 Jan 2021 by David Miller)
- merged to idea 'Set Elements Visibility as Friend/Protected' on 14 Jan 2021 15:17:37 by Daniël Kuhlmann
Merged this idea with 'Exposition type "Public"' (created on 23 Jun 2021 11:18:51 by Lilia Dias)

I think it would be good if when we were to expose an element as "public" we also had the option of exposing that element only to the module in which it belongs instead of exposing it to other applications. This way we can avoid the wrong consumption of an element in another application, which should not happen. 


In the property of the element where there is the option to "expose as public" include an option like "expose as public for this application" or "expose as public for all applications".


Best regards




This comment was:
- originally posted on idea 'Exposition type "Public"' (created on 23 Jun 2021 by Lilia Dias)
- merged to idea 'Set Elements Visibility as Friend/Protected' on 24 Jun 2021 03:57:51 by Justin James

Yes please! This is extremely important in order to achieve proper abstraction of concepts.

2025-02-22 18-27-01
Alfaro
 
MVP
Merged this idea with 'Use entities without public between modules' (created on 22 Nov 2021 14:59:12 by vignesh S)

we can use aggregates between two modules without make it public, 

conditions

1. two module should be in one application

2. two modules should be in service modules

fun :)

Merged this idea with 'Public property options "Yes/No/Application Only"' (created on 10 Apr 2022 12:12:20 by José Gonçalves)

Add another option on Public property - "Application Only".

It would be useful to keep it restricted only to modules of its Application.