jessnew benign zeenia

0 views
Skip to first unread message

Manases Yatnalkar

unread,
Aug 2, 2024, 12:53:47 PM8/2/24
to inhowase

We have a Firepower 4115 that we just recently migrated from ASA to FTD. We are looking to block netflix. We don't yet have the licensing in place to do URL filtering, so we have defined a netflix.com FQDN object and have an access list rule to block that. This seems to only work part of the time. We believe it was working correctly under ASA. Is it possible to block netflix at the firewall without URL filtering?

Since the FQDN option is hit or miss for your scenario I would recommend testing the block via application filters. If you edit your ACP go to applications tab and search for Netflix. There should already be Cisco provided Netflix filters. HTH!

I think you need URL license to do it proberly.. And i think the reason you see the block with fqdn netflix.com only works part of the time, is if users go to netflix.yyy then your acl wont block it. I dont know if you can do a wildcard fqdn in your access list so netflix.* and problably you should do *netflix.* if possible.

which ever geo location you in you do nslookup and upload the file (if you using FMC) go to objects-->security intelligence-->network list and feeds--->Add network list and feeds---> here a pop up will appear called it any name you want in "Type" call your text file and upload it.

If the field parameter is not set, the method name will be used as the field name.The @DgsQuery, @DgsMutation and @DgsSubscription annotations are shorthands to define datafetchers on the Query, Mutation and Subscription types.The following definitions are all equivalent.

Notice how a datafetcher can return complex objects or lists of objects.You don't have to create a separate datafetcher for each field.The framework will take care of only returning the fields that are specified in the query.For example, if a user queries:

The previous example assumed that you could load a list of Show objects from your database with a single query.It wouldn't matter which fields the user included in the GraphQL query; the cost of loading the shows would be the same.What if there is an extra cost to specific fields?For example, what if loading actors for a show requires an extra query?It would be wasteful to run the extra query to load actors if the actors field doesn't get returned to the user.

@DgsQuerypublic List shows() //Load shows, which doesn't include "actors" return shows;@DgsData(parentType = "Show", field = "actors")public List actors(DgsDataFetchingEnvironment dfe) Show show = dfe.getSource(); return actorsService.forShow(show.getId());The actors datafetcher only gets executed when the actors field is included in the query.The actors datafetcher also introduces a new concept; the DgsDataFetchingEnvironment.The DgsDataFetchingEnvironment gives access to the context, the query itself, data loaders, and the source object.The source object is the object that contains the field.For this example, the source is the Show object, which you can use to get the show's identifier to use in the query for actors.

Do note that the shows datafetcher is returning a list of Show, while the actors datafetcher fetches the actors for a single show.The framework executes the actors datafetcher for each Show returned by the shows datafetcher.If the actors get loaded from a database, this would now cause an N+1 problem. To solve the N+1 problem, you use data loaders.

Since v4.6.0, methods can be annotated with multiple @DgsData annotations.Effectively you can resolve multiple GraphQL Type fields via the same method implementation.To do so you will have to leverage the @DgsData.List annotation, for example:

The @InputArgument annotation will use the name of the method argument to match it with the name of an input argument sent in the query.Optionally we can specify the name argument in the @InputArgument annotation, if the argument name doesn't match the method argument name.

The framework converts input arguments to Java/Kotlin types.The first step for converting input arguments is graphql-java using scalar implementations to convert raw string input into whatever type the scalar represents.A GraphQL Int becomes an Integer in Java, a formatted date string becomes a LocalDateTime (depending on the scalars you're using!), lists become an instance of java.util.ArrayList.Input objects are represented as a Map in graphql-java.

The next step is the DGS Framework converting the Map to the Java/Kotlin classes that you use for the @InputArgument.For Java classes, the framework creates a new instance of the class using the no-arg constructor.This implies that a no-arg constructor is required.It then sets each field of the instance to the input argument values.

For Kotlin Data classes, the instance can only be created by passing in all arguments in the constructor.This means you have to make sure to make fields optional in the data class when the fields are optional in the GraphQL schema!

It's easy to confuse the conversion described above with JSON deserialization as you are familiar with in libraries such as Jackson.Although it looks similar, the mechanisms are completely unrelated. Input arguments aren't JSON, and the Scalar mechanism is really the core of how conversion works.This also means that Jackson annotations on Java/Kotlin types are not used at all.

@InputArgument is designed to work well with scalars.More information about defining custom scalars in the framework can be found here.For a scalar you typically either create a class representing the value, or use an existing type. Such types need to be mapped in Codegen configuration so that they don't (incorrectly) get generated.

If you're using Kotlin you must consider if an input type is nullable.If the schema defines an input argument as nullable, the code must reflect this by using a nullable type.If a non-nullable type receives a null value, Kotlin will throw an exception.

In Java you don't have to worry about this, types can always be null assuming you are using boxed types. Generally, we recommend using boxed types instead of unboxed if you are expecting null input.You do need to null check in your datafetching code for handling possible null inputs.If using unboxed types, null input will result in exceptions.

Input arguments are often defined as optional in schemas.Your datafetcher code needs to null-check arguments to check if they were provided.Instead of null-checks you can wrap an input argument in an Optional.

You do need to provide the type in the collectionType argument when using complex types, similar to using lists.If the argument is not provided, the value will be Optional.empty().It's a matter of preference to use Optional or not.

In the examples of @DgsData so far, we used string values for the parentType and field arguments.If you are using code generation you can instead use generated constants.Codegen creates a DgsConstants class with constants for each type and field in your schema.Using this we can write a datafetcher as follows:

Sometimes you need to evaluate HTTP headers, or other elements of the request, in a datafetcher.You can easily get an HTTP header value by using the @RequestHeader annotation.The @RequestHeader annotation is the same annotation as used in Spring WebMVC.Note that you will need to ensure you are using the webmvc stack for this functionality.

Technically, headers are lists of values. If multiple values are set, you can retrieve them as a list by using a List as your argument type. Otherwise, the values are concatenated to a single String.Similar to @InputArgument it's possible to wrap a header or parameter in an Optional.

Similarly, you can get request parameters using @RequestParam.Both @RequestHeader and @RequestParam support a defaultValue and required argument.If a @RequestHeader or @RequestParam is required, doesn't have a defaultValue and isn't provided, a DgsInvalidInputArgumentException is thrown.

Because Spring WebMVC and Spring Webflux use different types to represent the request, the DgsRequestData is different depending on what environment (WebMVC/WebFlux) you're running in.The DgsRequestData interface only gives access to the request headers and the extensions.To get the actual request object, you need to cast the DgsRequestData to the correct implementation.This is either DgsWebMvcRequestData or DgsReactiveRequestData.Let's use this in an example to set a cookie, which is done through the response object.

The DgsRequestData object described in the previous section is part of the data fetching context.The DGS Framework adds the DgsRequestData to the data fetching context.You can also add your own data to the context, for use in data fetchers.The context is initialized per request, before query execution starts.

Oh, and for iPhone 15 peoples, the existing two-years free applies. Meaning that on the whole, Apple has deferred this potential-payment-problem decision till 2025. These days, the feature is available in the following countries, for both iPhone 14 and iPhone 15 users.

The core difference with an app like RideWithGPS is that it also has sensor support (even Garmin Varia radar integration), as well as uploads to all the various 3rd party platforms like a head unit (whereas Google Maps will most definitely not upload to Strava).

Two Things:
1-I like the PeakDesign phone holder on the handle bars, good choice!
2-I wish Peloton would allow none Peloton bikes to connect to their system, specifically for their scenic rides. I like to do those rides from time-to-time, but I am not a fan of the bike itself as I prefer to ride my Cannondale on my Wahoo.

Most other communicators (EPIRB/PLB, 911 call on a cell phone) will pass through an emergency call without any other charges, so long as the device functions. I think where Garmin and others in the satellite device arena are making their money is non-emergency check-ins and tracking, as well as messaging, rather than on a cost per emergency call.

I doubt it will ever happen, but it would be interesting if NordicTrack finally feels enough pressure to add Netflix to its platform after years of users having to use all kinds of workarounds to get it working.

90f70e40cf
Reply all
Reply to author
Forward
0 new messages