Showing posts with label public. Show all posts
Showing posts with label public. Show all posts

Friday, March 9, 2012

Defining an event inside of an assembly => UNSAFE (no workarounds?)

Can someone verify that an assembly containing an interface with an event definition, such as...

public interface A {
event EventHandler Foo;
}

... can never be loaded under SAFE or EXTERNAL_ACCESS ?

It appears that the compiler-generated add_xxx and remove_xxx have the MethodImpl(MethodImplOptions.Synchronized) attribute defined by default, and "Explicit synchronization is not allowed". The same limitation also applies to classes by default, although technically one is able to define the implementation directly (clearly not ideal).

That's exactly correct. There is some possibility in the future that the CLR could change the way they implement EventHandler synchronization to allow it in non-unsafe assemblies, but for now that is the restricition.

Steven

Tuesday, February 14, 2012

Default Public Permissions and Guest

There are numerous articles about removing permissions from public, dropping
extended stored procedures and removing the guest account from the msdb
database. Has anyone found any documentation from Microsoft on what their
position is on making any of the afore mentioned changes. I'm reluctant to
make any changes to the default security model even though external audits
indicate that these changes should be made. Any advise would be appreciated
.Hi,
removing guest account from msdb and disallowing public with strong password
mechanism , encryption of data,ntfs file system , windows authentication
could help to prevent from sql injection issue...
please refer following articles :
http://www.microsoft.com/technet/pr...07.msp
x
http://www.microsoft.com/technet/pr...07.msp
x
Regards
--
Andy Davis
Activecrypt Team
---
SQL Server Encryption Software
http://www.activecrypt.com
"Rick" wrote:
[vbcol=seagreen]
> There are numerous articles about removing permissions from public, droppi
ng
> extended stored procedures and removing the guest account from the msdb
> database. Has anyone found any documentation from Microsoft on what their
> position is on making any of the afore mentioned changes. I'm reluctant t
o
> make any changes to the default security model even though external audits
> indicate that these changes should be made. Any advise would be appreciated.[/vbc
ol]|||Hi,
have you refer as i suggest !?
--
Andy Davis
Activecrypt Team
---
SQL Server Encryption Software
http://www.activecrypt.com
"Andy Davis" wrote:
[vbcol=seagreen]
> Hi,
> removing guest account from msdb and disallowing public with strong passwo
rd
> mechanism , encryption of data,ntfs file system , windows authentication
> could help to prevent from sql injection issue...
> please refer following articles :
> http://www.microsoft.com/technet/pr...07.m
spx
> http://www.microsoft.com/technet/pr...07.m
spx
> Regards
> --
> Andy Davis
> Activecrypt Team
> ---
> SQL Server Encryption Software
> http://www.activecrypt.com
>
> "Rick" wrote:
>|||I'm familiar with the article that was referenced, however it doesn't answer
my specific question which is; Can default permissions be revoked from publi
c
and still have Microsoft support the installation. This means revoking
execute from all system stored procedures and select form all catalogs, view
s
and tables from public.
"Andy Davis" wrote:
[vbcol=seagreen]
> Hi,
> have you refer as i suggest !?
> --
> Andy Davis
> Activecrypt Team
> ---
> SQL Server Encryption Software
> http://www.activecrypt.com
>
> "Andy Davis" wrote:
>|||Hi,
You can remove guest/public access but its not recomended , please refer
following thread FYI why it is not recomended
http://www.sql-server-performance.c...p?TOPIC_ID=3596
Regards
--
Andy Davis
Activecrypt Team
---
SQL Server Encryption Software
http://www.activecrypt.com
"Rick" wrote:
[vbcol=seagreen]
> I'm familiar with the article that was referenced, however it doesn't answ
er
> my specific question which is; Can default permissions be revoked from pub
lic
> and still have Microsoft support the installation. This means revoking
> execute from all system stored procedures and select form all catalogs, vi
ews
> and tables from public.
> "Andy Davis" wrote:
>

default public permissions

Can anyone tell me what are (or where to find) the default permissions
granted to the public role? I think that permissions are granted not only in
the user database in question, but also in the system databases? Please let
me know. Thanks.
Yes, the public role is granted specific permissions in every db by default.
You can change these by expanding the DB in Enterprise Manager, Databases,
Expand the database in question, expand Roles. Double click Public. Click
the Permissions button.
You should see exec perms on a bunch of system stored procs, system tables
in the user db, etc.
Notice that by default the public role doesn't get permissions on every
object in the db.
You can change the public role's permissions here, but be sure to compensate
by giving those permissions to the users that will need it through another
role.
Every user in the db is in the public role, so the changes you make will
affect everyone. So, don't deny permissions, just remove them.
Donna Lambert
"J Jetson" wrote:

> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only in
> the user database in question, but also in the system databases? Please let
> me know. Thanks.
|||Hi,
See this article:-
http://www.databasejournal.com/featu...le.php/1478701
Thanks
Hari
SQL Server MVP
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:333F33A8-C4AA-4CFC-B0F3-DAE1BDD6F128@.microsoft.com...
> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only
> in
> the user database in question, but also in the system databases? Please
> let
> me know. Thanks.

default public permissions

Can anyone tell me what are (or where to find) the default permissions
granted to the public role? I think that permissions are granted not only in
the user database in question, but also in the system databases? Please let
me know. Thanks.Yes, the public role is granted specific permissions in every db by default.
You can change these by expanding the DB in Enterprise Manager, Databases,
Expand the database in question, expand Roles. Double click Public. Click
the Permissions button.
You should see exec perms on a bunch of system stored procs, system tables
in the user db, etc.
Notice that by default the public role doesn't get permissions on every
object in the db.
You can change the public role's permissions here, but be sure to compensate
by giving those permissions to the users that will need it through another
role.
Every user in the db is in the public role, so the changes you make will
affect everyone. So, don't deny permissions, just remove them.
Donna Lambert
"J Jetson" wrote:
> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only in
> the user database in question, but also in the system databases? Please let
> me know. Thanks.|||Hi,
See this article:-
http://www.databasejournal.com/features/mssql/article.php/1478701
Thanks
Hari
SQL Server MVP
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:333F33A8-C4AA-4CFC-B0F3-DAE1BDD6F128@.microsoft.com...
> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only
> in
> the user database in question, but also in the system databases? Please
> let
> me know. Thanks.

default public permissions

Can anyone tell me what are (or where to find) the default permissions
granted to the public role? I think that permissions are granted not only in
the user database in question, but also in the system databases? Please let
me know. Thanks.Yes, the public role is granted specific permissions in every db by default.
You can change these by expanding the DB in Enterprise Manager, Databases,
Expand the database in question, expand Roles. Double click Public. Click
the Permissions button.
You should see exec perms on a bunch of system stored procs, system tables
in the user db, etc.
Notice that by default the public role doesn't get permissions on every
object in the db.
You can change the public role's permissions here, but be sure to compensate
by giving those permissions to the users that will need it through another
role.
Every user in the db is in the public role, so the changes you make will
affect everyone. So, don't deny permissions, just remove them.
Donna Lambert
"J Jetson" wrote:

> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only
in
> the user database in question, but also in the system databases? Please le
t
> me know. Thanks.|||Hi,
See this article:-
http://www.databasejournal.com/feat...cle.php/1478701
Thanks
Hari
SQL Server MVP
"J Jetson" <JJetson@.discussions.microsoft.com> wrote in message
news:333F33A8-C4AA-4CFC-B0F3-DAE1BDD6F128@.microsoft.com...
> Can anyone tell me what are (or where to find) the default permissions
> granted to the public role? I think that permissions are granted not only
> in
> the user database in question, but also in the system databases? Please
> let
> me know. Thanks.

Default Public Database Role

Does anyone know the reason for this role, and if there
are any impact if I revoke/deny all permissions on this
role from the system databases (tables/SP/etc)?
Reason: All SQL logins default to this role, and can see
all system table contents.See Public role in SQL Books Online.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.